Create a admin main wordpress custom menu item

PHP

public function create_menu_item() {
		/**
		 * Register a custom menu page.
		 */
		function wpdocs_register_my_custom_menu_page() {
		    add_menu_page(
		        __( 'Custom Menu Title', 'textdomain' ),
		        'custom menu',
		        'manage_options',
		        'myplugin/myplugin-admin.php',
		        '',
		        plugins_url( 'myplugin/images/icon.png' ),
		        6
		    );
		}
		add_action( 'admin_menu', 'wpdocs_register_my_custom_menu_page' );
	}

External Link for Create a admin main wordpress custom menu item

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

❤👩‍💻🕹

Random Quote
1. Show your work to the world instead of keeping in your head💆. 2. Do the work consistently👌 3. Respect your work🥰 4. Don't postpone your work 5. Make mistakes 🔥🔥🔥
Unknown