Introduce WP_Dependencies::get_data() method, change scripts and styles priority to follow the "natural" order in HTML, i.e. the last one wins, props scribu, see #11520

git-svn-id: https://develop.svn.wordpress.org/trunk@18480 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-07-28 18:24:00 +00:00
parent d6f842b4c2
commit 0191ed92cd
5 changed files with 65 additions and 34 deletions

View File

@@ -66,9 +66,9 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
* ...
* }
* The $name is passed directly so it should be qualified JS variable /[a-zA-Z0-9_]+/
* The $data array is JSON encoded. If called more than once for the same $handle, with the same $name,
* The $data array is JSON encoded. If called more than once for the same $handle with the same $name,
* the object would contain all values. In that case if two or more keys are the same,
* the first value is kept and subsequent values are ignored.
* the last value overwrites the previous.
*
* @since 3.3
* @see WP_Scripts::add_script_data()