mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
WP_Dependencies: pass NULL to disable script and style version query strings, props scribu amattie, fixes #11315
git-svn-id: https://develop.svn.wordpress.org/trunk@12558 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -38,7 +38,12 @@ function wp_print_scripts( $handles = false ) {
|
||||
* Register new JavaScript file.
|
||||
*
|
||||
* @since r16
|
||||
* @see WP_Dependencies::add() For parameter information.
|
||||
* @param string $handle Script name
|
||||
* @param string $src Script url
|
||||
* @param array $deps (optional) Array of script names on which this script depends
|
||||
* @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable
|
||||
* @param bool (optional) Wether to enqueue the script before </head> or before </body>
|
||||
* @return null
|
||||
*/
|
||||
function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
|
||||
global $wp_scripts;
|
||||
@@ -56,7 +61,7 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
|
||||
* Localizes only if script has already been added.
|
||||
*
|
||||
* @since r16
|
||||
* @see WP_Script::localize()
|
||||
* @see WP_Scripts::localize()
|
||||
*/
|
||||
function wp_localize_script( $handle, $object_name, $l10n ) {
|
||||
global $wp_scripts;
|
||||
@@ -86,8 +91,8 @@ function wp_deregister_script( $handle ) {
|
||||
* Registers the script if src provided (does NOT overwrite) and enqueues.
|
||||
*
|
||||
* @since r16
|
||||
* @see WP_Script::add(), WP_Script::enqueue()
|
||||
*/
|
||||
* @see wp_register_script() For parameter information.
|
||||
*/
|
||||
function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
|
||||
global $wp_scripts;
|
||||
if ( !is_a($wp_scripts, 'WP_Scripts') )
|
||||
|
||||
Reference in New Issue
Block a user