<plugin_name>_add_admin_menu
-----------------------------------------------------------------------------------.
Description
View instruction at http://codex.wordpress.org/Roles_and_Capabilities menu_slug => quotes-orders-mode : (required) The slug name to refer to this menu by. function => my_function_name : (required) The function that displays the page content for the menu page. icon_url => http://my_icon.png : (optional) The url to the icon to be used for this menu. position => 50 : (optional) The position in the menu order this menu should appear. By default, if this parameter is omitted, the menu will appear at the bottom of the menu structure. admin_url => admin.php : (required) The admin url : admin.php , options-general.php callback_function=> my_callback_function: (optional) The callback function is called when this page does not have tab script_function => my_script_function : (optional) The script function that only include for this page. view_doc => '' : (optional) Support html. The text show on the heading type => submenu : (required) add it as sub menu on left sidebar of Dashboard parent_slug => quotes-orders-mode : (required) The slug name for the parent menu. page_title => Quotes & Orders Mode : (required) The text to be displayed in the title tags of the page when the menu is selected menu_title => Quotes & Orders Mode : (required) The text to be displayed in the title tags of the page when the menu is selected capability => manage_options : (required) The capability required for this menu to be displayed to the user. View instruction at http://codex.wordpress.org/Roles_and_Capabilities menu_slug => quotes-orders-mode : (required) The slug name to refer to this menu by. function => my_function_name : (required) The function that displays the page content for the menu page. admin_url => admin.php : (required) The admin url : admin.php , options-general.php callback_function=> my_callback_function: (optional) The callback function is called when this page does not have tab script_function => my_script_function : (optional) The script function that only include for this page. view_doc => '' : (optional) Support html. The text show on the heading )
Parameters (1)
- 0. $this_admin_menu (unknown)
- The this admin menu.
Usage
- To run the hook, copy the example below.
- $this_admin_menu = apply_filters( '{$plugin_name}_add_admin_menu', $this_admin_menu );
- if ( !empty( $this_admin_menu ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the <plugin_name>_add_admin_menu callback
- function filter_plugin_name_add_admin_menu( $this_admin_menu ) {
- // make filter magic happen here...
- return $this_admin_menu;
- };
- // add the filter
- add_filter( "{$plugin_name}_add_admin_menu", 'filter_plugin_name_add_admin_menu', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( "{$plugin_name}_add_admin_menu", 'filter_plugin_name_add_admin_menu', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /admin/admin-init.php
- $this->admin_menu = apply_filters( $this->plugin_name . '_add_admin_menu', $this->admin_menu );