/** * Creates a new menu (not menu-item but whole menu). * All top-level pages are added automatically to this new menu. * * Related action hooks: * - wp_ajax_create_menu * * @since 1.0.0 */ public function ajax_action_create_menu() { $msg = MS_Helper_Settings::SETTINGS_MSG_NOT_UPDATED; $content = ''; if ($this->verify_nonce() && $this->is_admin_user()) { MS_Model_Pages::create_default_menu(); $setup = MS_Factory::create('MS_View_Settings_Page_Setup'); $content = $setup->show_menu_controls(); $msg = MS_Helper_Settings::SETTINGS_MSG_UPDATED; } echo $msg . ':' . $content; exit; }