panels() публичный Метод

Get the registered panels.
С версии: 4.0.0
public panels ( ) : array
Результат array Panels.
Пример #1
0
 /**
  * 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);
     }
 }
 /**
  * @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));
 }