Created
October 27, 2013 17:09
-
-
Save mvnp/7185107 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
add_action('admin_menu', 'my_menu_pages'); | |
function my_menu_pages(){ | |
add_menu_page ('Adicionar', 'Adicionar contato', 'manage_options', 'add-contato', 'my_custom_add_page', '', 4); | |
add_submenu_page ('Editar', 'Editar contato', 'Editar contato', 'manage_options', 'edit-contato', 'my_custom_sub_edit_page' ); | |
add_submenu_page ('Deletar', 'Submenu Page Title2', 'Whatever You Want2', 'manage_options', 'del-contato', 'my_custom_sub_del_page'); | |
} | |
function my_custom_add_page(){ | |
echo '<div class="wrap"><div id="icon-options-general" class="icon32"><br></div> | |
<h2>Theme</h2></div>'; | |
require("add-contato.php"); | |
} | |
function my_custom_sub_edit_page(){ | |
echo '<div class="wrap"><div id="icon-options-general" class="icon32"><br></div> | |
<h2>Theme</h2></div>'; | |
require("edit-contato.php"); | |
} | |
function my_custom_sub_del_page(){ | |
echo '<div class="wrap"><div id="icon-options-general" class="icon32"><br></div> | |
<h2>Theme</h2></div>'; | |
require("del-contato.php"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment