WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/17/2011 06:26:41 AM (10 years ago)
Author:
azaozz
Message:

Don't call debug_backtrace() in wp_scripts_init() and wp_styles_init(), props dd32, see #11526

File:
1 edited

Legend:

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

    r18556 r18557  
    174174
    175175    if ( !$done && !is_a($wp_styles, 'WP_Styles') ) {
    176         if ( !did_action('after_setup_theme') ) {
    177             $func = debug_backtrace();
    178             $trace = !empty($func[1]['function']) ? $func[1]['function'] : __FUNCTION__;
    179 
    180             _doing_it_wrong( $trace, __( '$wp_styles should not be accessed before the "init" hook.' ), '3.3' );
    181         }
     176        if ( !did_action('after_setup_theme') )
     177            _doing_it_wrong( __FUNCTION__, __( '$wp_styles should not be accessed before the "init" hook.' ), '3.3' );
    182178
    183179        $wp_styles = new WP_Styles();
Note: See TracChangeset for help on using the changeset viewer.