Where is the submitted $_POST array stored after an option page submission?

You only need one callback function, as defined in your call to register_setting() (Codex ref.): register_setting( $option_group, $option_name, $sanitize_callback ); Thus, all options are contained in an array, in a single database entry, $option_name. Then, the callback function is passed the $input variable that holds all of the form-submitted data, the function manipulates/sanitizes those data, … Read more

add_page_menu to make shortcut to widgets

You can add a link to the widgets.php like that: add_action( ‘admin_menu’, ‘f711_add_widgets_shortcut’, 999 ); function f711_add_widgets_shortcut() { add_menu_page( ‘Widgets’, ‘Widgets’, ‘publish_pages’, ‘widgets.php’, ”, ”, 61 ); } Be sure to check your permission settings, and you may also include another image. You can find the documentation about the function at The Codex.

How to avoid creating first submenu page that is same as menu page?

You can set slug of a subpage to be the same as slug of parent page. For example: public function onixion_admin_menu_option() { add_menu_page(‘onixion’, ‘Onixion’, ‘manage_options’, ‘onixion-admin-menu’, array(&$this, ‘onixion_main_page’ ), ‘dashicons-chart-area’, ‘200’ ); add_submenu_page( ‘onixion-admin-menu’, ‘scripts’, ‘Scripts’, ‘manage_options’, ‘onixion-admin-menu’, // <– here we set the same slug as for parent page array(&$this, ‘onixion_scripts_page’ ) ); add_submenu_page( … Read more