本文整理汇总了PHP中WP_UnitTestCase::clean_up_global_scope方法的典型用法代码示例。如果您正苦于以下问题:PHP WP_UnitTestCase::clean_up_global_scope方法的具体用法?PHP WP_UnitTestCase::clean_up_global_scope怎么用?PHP WP_UnitTestCase::clean_up_global_scope使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WP_UnitTestCase
的用法示例。
在下文中一共展示了WP_UnitTestCase::clean_up_global_scope方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
/**
* Clean up global scope.
*/
function clean_up_global_scope()
{
global $customize_snapshots_plugin;
unset($_REQUEST['customize_snapshot_uuid']);
parent::clean_up_global_scope();
$customize_snapshots_plugin = new Plugin();
$customize_snapshots_plugin->init();
}
示例2: array
function clean_up_global_scope()
{
global $wp_widget_factory, $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
$wp_registered_sidebars = array();
$wp_registered_widgets = array();
$wp_registered_widget_controls = array();
$wp_registered_widget_updates = array();
$wp_widget_factory->widgets = array();
parent::clean_up_global_scope();
}
示例3: array
function clean_up_global_scope()
{
global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_post_types, $wp_customize;
// @codingStandardsIgnoreStart
$wp_registered_sidebars = $wp_registered_widgets = $wp_registered_widget_controls = $wp_registered_widget_updates = array();
// @codingStandardsIgnoreEnd
$this->plugin->widget_factory->widgets = array();
unset($wp_post_types[Widget_Posts::INSTANCE_POST_TYPE]);
$wp_customize = null;
parent::clean_up_global_scope();
}
示例4: buddypress
function clean_up_global_scope()
{
buddypress()->bp_nav = buddypress()->bp_options_nav = buddypress()->action_variables = buddypress()->canonical_stack = buddypress()->unfiltered_uri = $GLOBALS['bp_unfiltered_uri'] = array();
buddypress()->current_component = buddypress()->current_item = buddypress()->current_action = buddypress()->current_member_type = '';
buddypress()->unfiltered_uri_offset = 0;
buddypress()->is_single_item = false;
buddypress()->current_user = new stdClass();
buddypress()->displayed_user = new stdClass();
buddypress()->loggedin_user = new stdClass();
buddypress()->pages = array();
parent::clean_up_global_scope();
}
示例5: array
function clean_up_global_scope()
{
parent::clean_up_global_scope();
$locales =& GP_Locales::instance();
$locales->locales = array();
$_GET = array();
$_POST = array();
/**
* @todo re-initialize all thing objects
*/
GP::$translation_set = new GP_Translation_Set();
GP::$original = new GP_Original();
}
示例6:
/**
* Use this to clean up any global scope singletons etc that we may have being used by EE so
* that they are fresh between tests.
*
* @todo this of course means we need an easy way to reset our singletons...
* @see parent::cleanup_global_scope();
*/
function clean_up_global_scope()
{
parent::clean_up_global_scope();
}
示例7:
/**
* Delete the $wp_customize global when cleaning up scope.
*/
function clean_up_global_scope()
{
global $wp_customize;
$wp_customize = null;
parent::clean_up_global_scope();
}
示例8: unset
/**
* Clean up global scope.
*/
function clean_up_global_scope()
{
unset($GLOBALS['wp_scripts']);
unset($GLOBALS['wp_styles']);
unset($_REQUEST['customize_snapshot_uuid']);
unset($_REQUEST['wp_customize_preview_ajax']);
parent::clean_up_global_scope();
}
示例9: unset
function clean_up_global_scope()
{
parent::clean_up_global_scope();
if (isset($GLOBALS['current_screen'])) {
unset($GLOBALS['current_screen']);
}
global $frm_vars;
$frm_vars = array('load_css' => false, 'forms_loaded' => array(), 'created_entries' => array(), 'pro_is_authorized' => false, 'next_page' => array(), 'prev_page' => array());
if (class_exists('FrmUpdatesController')) {
global $frm_update;
$frm_update = new FrmUpdatesController();
}
if (class_exists('FrmProEddController')) {
$frmedd_update = new FrmProEddController();
$frm_vars['pro_is_authorized'] = $frmedd_update->pro_is_authorized();
}
}