Changeset 18557
- Timestamp:
- 08/17/2011 06:26:41 AM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.wp-scripts.php
r18556 r18557 167 167 168 168 if ( !$done && !is_a($wp_scripts, 'WP_Scripts') ) { 169 if ( !did_action('after_setup_theme') ) { // last action before init 170 $func = debug_backtrace(); 171 $trace = !empty($func[1]['function']) ? $func[1]['function'] : __FUNCTION__; 172 173 _doing_it_wrong( $trace, __( '$wp_scripts should not be accessed before the "init" hook.' ), '3.3' ); 174 } 169 if ( !did_action('after_setup_theme') ) // last action before init 170 _doing_it_wrong( __FUNCTION__, __( '$wp_scripts should not be accessed before the "init" hook.' ), '3.3' ); 175 171 176 172 $wp_scripts = new WP_Scripts(); -
trunk/wp-includes/functions.wp-styles.php
r18556 r18557 174 174 175 175 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' ); 182 178 183 179 $wp_styles = new WP_Styles();
Note: See TracChangeset
for help on using the changeset viewer.