mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-26 00:04:28 +00:00
Don't call debug_backtrace() in wp_scripts_init() and wp_styles_init(), props dd32, see #11526
git-svn-id: https://develop.svn.wordpress.org/trunk@18557 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -166,12 +166,8 @@ function wp_scripts_init() {
|
||||
static $done = false;
|
||||
|
||||
if ( !$done && !is_a($wp_scripts, 'WP_Scripts') ) {
|
||||
if ( !did_action('after_setup_theme') ) { // last action before init
|
||||
$func = debug_backtrace();
|
||||
$trace = !empty($func[1]['function']) ? $func[1]['function'] : __FUNCTION__;
|
||||
|
||||
_doing_it_wrong( $trace, __( '$wp_scripts should not be accessed before the "init" hook.' ), '3.3' );
|
||||
}
|
||||
if ( !did_action('after_setup_theme') ) // last action before init
|
||||
_doing_it_wrong( __FUNCTION__, __( '$wp_scripts should not be accessed before the "init" hook.' ), '3.3' );
|
||||
|
||||
$wp_scripts = new WP_Scripts();
|
||||
$done = true;
|
||||
|
||||
Reference in New Issue
Block a user