Make WordPress Core

Changeset 18532


Ignore:
Timestamp:
08/11/2011 04:45:14 AM (14 years ago)
Author:
nbachiyski
Message:

Explicitly globalize some variables, so that unit tests can run WordPress inside a function. Fixes #17749

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r17751 r18532  
    12891289    }
    12901290}
    1291 $wp_embed = new WP_Embed();
     1291$GLOBALS['wp_embed'] = new WP_Embed();
    12921292
    12931293/**
  • trunk/wp-includes/widgets.php

    r18096 r18532  
    386386 * Private
    387387 */
    388  $_wp_deprecated_widgets_callbacks = array(
     388 $GLOBALS['_wp_deprecated_widgets_callbacks'] = array(
    389389    'wp_widget_pages',
    390390    'wp_widget_pages_control',
  • trunk/wp-settings.php

    r18450 r18532  
    104104// Run the installer if WordPress is not installed.
    105105wp_not_installed();
     106
    106107
    107108// Load most of WordPress.
     
    250251 * @since 2.8.0
    251252 */
    252 $wp_widget_factory = new WP_Widget_Factory();
     253$GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
    253254
    254255do_action( 'setup_theme' );
Note: See TracChangeset for help on using the changeset viewer.