- add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function =' ', string $icon_url = ' ', int position = ' ' );
- add_menu_page( 'My Theme Title', 'Settings', 'manage_options', 'Excellent_Programming', 'excellent_create_page', get_template_directory_uri() . '/img/sunset-icon.png', 110 );
- add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '' );
- When main menu appear in submenu: use main menu slug '$menu_slug' with submenu slug. Other submenu slug has their identical slug. Parent slug would be same. Also, function should be same name, if same name two function will execute.
- add_submenu_page( 'iftekhar-guddi', 'Guddi Settings', 'Guddi Settings', 'manage_options', 'guddi_settings', 'add_submenu_page_function_2');
- function main_function() {//generation of our admin page
- add_action( 'admin_menu', 'main_function');
WordPress
WordPress Plugin Development
WordPress Theme Development
No comments:
Post a Comment