wp_dequeue_script() and wp_dequeue_style(). fixes #14815. props scribu
git-svn-id: https://develop.svn.wordpress.org/trunk@15601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5c05a437a9
commit
80055bcec2
@ -107,6 +107,20 @@ function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false
|
|||||||
$wp_scripts->enqueue( $handle );
|
$wp_scripts->enqueue( $handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an enqueued script.
|
||||||
|
*
|
||||||
|
* @since WP 3.1
|
||||||
|
* @see WP_Scripts::dequeue() For parameter information.
|
||||||
|
*/
|
||||||
|
function wp_dequeue_script( $handle ) {
|
||||||
|
global $wp_scripts;
|
||||||
|
if ( !is_a($wp_scripts, 'WP_Scripts') )
|
||||||
|
$wp_scripts = new WP_Scripts();
|
||||||
|
|
||||||
|
$wp_scripts->dequeue( $handle );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether script has been added to WordPress Scripts.
|
* Check whether script has been added to WordPress Scripts.
|
||||||
*
|
*
|
||||||
|
@ -105,6 +105,20 @@ function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false,
|
|||||||
$wp_styles->enqueue( $handle );
|
$wp_styles->enqueue( $handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove an enqueued style.
|
||||||
|
*
|
||||||
|
* @since WP 3.1
|
||||||
|
* @see WP_Styles::dequeue() For parameter information.
|
||||||
|
*/
|
||||||
|
function wp_dequeue_style( $handle ) {
|
||||||
|
global $wp_styles;
|
||||||
|
if ( !is_a($wp_styles, 'WP_Styles') )
|
||||||
|
$wp_styles = new WP_Styles();
|
||||||
|
|
||||||
|
$wp_styles->dequeue( $handle );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether style has been added to WordPress Styles.
|
* Check whether style has been added to WordPress Styles.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user