Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
register_script purpose
#1
Hi,

First I want to indicate that, in admin/inc/plugin_functions.php, queue_script('jquery-ui', GSBACK); is missing.

Now the question is the following. What is the meaning of the version parameter?

As I see in the register_script function, if I register, lets say, jquery 1.8 in the header file but a plugin registers jquery 1.7, the version number is not taken into account and the original setting is lost.

Regards,
Mauro.
Reply
#2
Thanks, mxmauro.

The scripts are registered first and we queue and load jqeury, fancybox and fancybox.css as these are used
on the majority of the backend.

if you then look at admin/templates/header.php

we load jquery-ui only on the menu manager page as we only use these functions here.

We preregister it so as to allow any plugin writers to load it by queuing the script.

The version number is there for information only.
My Github Repos: Github
Website: DigiMute
Reply
#3
I thought jquery-ui was working.
Ill double check tho.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
it does work, we just load it on the menu manager page.

Any plugin author that needs it just need to issue:

queue_script('jquery-ui', GSBACK);

to load it.

Its already registered either locally or via CDN.
My Github Repos: Github
Website: DigiMute
Reply
#5
FYI
n00dles101's post about Getsimple 3.1 Script/Style queuing:
http://get-simple.info/forums/showthread.php?tid=2518
Reply
#6
ohh I misunderstood the post.
I guess we can just load it all the time, i mean if we are using the library it should be available all the time.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)