Skip to content

Instantly share code, notes, and snippets.

@KresimirKoncicNeuralab
Last active August 29, 2015 14:01
Show Gist options
  • Save KresimirKoncicNeuralab/17527a092ea618e84838 to your computer and use it in GitHub Desktop.
Save KresimirKoncicNeuralab/17527a092ea618e84838 to your computer and use it in GitHub Desktop.
add_action( 'admin_menu', 'my_tester_menu' );
function my_tester_menu()
{
add_menu_page( 'Tester Options', 'Tester', 'edit_others_pages', 'tester', 'my_tester_options', null, '4.5' );
add_submenu_page( 'tester', 'Tester sub 1', 'Tester sub 1', 'edit_others_pages', 'testers', 'testCodeFunction1');
add_submenu_page( 'tester', 'Tester sub 2', 'Tester sub 2', 'edit_others_pages', 'testers', 'testCodeFunction2');
}
function my_tester_options()
{
echo '<div class="wrap">';
echo '<br/><br/><br/><br/><b>Testing stuff.</b><br/><br/>';
echo 'Testing paragraph';
echo '</div>';
}
function testCodeFunction1()
{
//do something here
}
function testCodeFunction2()
{
//do something here
}
@KresimirKoncicNeuralab
Copy link
Author

Populate Wordpress admin area with custom testing function. Output from function is displayed on the right side of WP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment