Пример #1
0
 /**
  * Adds a new page to the WordPress admin which should not be part of any menu.
  *
  * This function is only used for the special case when a menu component's slug is set to 'none'.
  * This allows you to add pages that are not visible in any menu.
  *
  * @since 0.5.0
  * @param WPDLib\Components\Base $menu_item the component to add to the menu
  * @return bool whether the component was successfully added
  */
 protected function add_non_menu_page($menu_item)
 {
     $status = false;
     if (is_callable(array($menu_item, 'add_to_menu'))) {
         $status = $menu_item->add_to_menu(array('mode' => 'submenu', 'menu_slug' => null));
     }
     return $status;
 }