Created
July 10, 2017 13:34
-
-
Save domantasg/661b58de940f176ae5931b6d79c2cc52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Add my new menu to the Admin Control Panel | |
*/ | |
// Hook the 'admin_menu' action hook, run the function named 'mfp_Add_My_Admin_Link()' | |
add_action( 'admin_menu', 'mfp_Add_My_Admin_Link' ); | |
// Add a new top level menu link to the ACP | |
function mfp_Add_My_Admin_Link() | |
{ | |
add_menu_page( | |
'My First Page', // Title of the page | |
'My First Plugin', // Text to show on the menu link | |
'manage_options', // Capability requirement to see the link | |
'includes/mfp-first-acp-page.php' // The 'slug' - file to display when clicking the link | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment