WordPress.org

Make WordPress Core

Changeset 15601


Ignore:
Timestamp:
09/09/10 04:42:47 (4 years ago)
Author:
markjaquith
Message:

wp_dequeue_script() and wp_dequeue_style(). fixes #14815. props scribu

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.wp-scripts.php

    r15590 r15601  
    109109 
    110110/** 
     111 * Remove an enqueued script. 
     112 * 
     113 * @since WP 3.1 
     114 * @see WP_Scripts::dequeue() For parameter information. 
     115 */ 
     116function wp_dequeue_script( $handle ) { 
     117    global $wp_scripts; 
     118    if ( !is_a($wp_scripts, 'WP_Scripts') ) 
     119        $wp_scripts = new WP_Scripts(); 
     120 
     121    $wp_scripts->dequeue( $handle ); 
     122} 
     123 
     124/** 
    111125 * Check whether script has been added to WordPress Scripts. 
    112126 * 
  • trunk/wp-includes/functions.wp-styles.php

    r14255 r15601  
    107107 
    108108/** 
     109 * Remove an enqueued style. 
     110 * 
     111 * @since WP 3.1 
     112 * @see WP_Styles::dequeue() For parameter information. 
     113 */ 
     114function wp_dequeue_style( $handle ) { 
     115    global $wp_styles; 
     116    if ( !is_a($wp_styles, 'WP_Styles') ) 
     117        $wp_styles = new WP_Styles(); 
     118 
     119    $wp_styles->dequeue( $handle ); 
     120} 
     121 
     122/** 
    109123 * Check whether style has been added to WordPress Styles. 
    110124 * 
Note: See TracChangeset for help on using the changeset viewer.