本文整理匯總了PHP中WP_Customize_Manager::panels方法的典型用法代碼示例。如果您正苦於以下問題:PHP WP_Customize_Manager::panels方法的具體用法?PHP WP_Customize_Manager::panels怎麽用?PHP WP_Customize_Manager::panels使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WP_Customize_Manager
的用法示例。
在下文中一共展示了WP_Customize_Manager::panels方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _unregister_core_ui
/**
* Removes all non-AMP sections and panels.
*
* Provides a clean, standalone instance-like experience by removing all non-AMP registered panels and sections.
*
* @since 0.4
* @access private
*/
private function _unregister_core_ui()
{
$panels = $this->wp_customize->panels();
$sections = $this->wp_customize->sections();
foreach ($panels as $panel_id => $object) {
$this->wp_customize->remove_panel($panel_id);
}
foreach ($sections as $section_id => $object) {
$this->wp_customize->remove_section($section_id);
}
}
示例2: array
/**
* @ticket 37128
*/
function test_prepare_controls_wp_list_sort_panels()
{
wp_set_current_user(self::$admin_user_id);
$panels = array('foo' => 2, 'bar' => 4, 'foobar' => 3, 'key' => 1);
$panels_sorted = array('key', 'foo', 'foobar', 'bar');
foreach ($panels as $panel_id => $priority) {
$this->manager->add_panel($panel_id, array('priority' => $priority));
}
$this->manager->prepare_controls();
$result = $this->manager->panels();
$this->assertEquals($panels_sorted, array_keys($result));
}