Skip to content

Instantly share code, notes, and snippets.

@michaeluno
Created February 5, 2013 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeluno/4713595 to your computer and use it in GitHub Desktop.
Save michaeluno/4713595 to your computer and use it in GitHub Desktop.
A simple admin page template.
<?php
/* Plugin Name: My Admin Page Template */
add_action( 'admin_menu', 'my_admin_menu_func' );
function my_admin_menu_func() {
add_options_page( "My Admin Page", "My Admin Page", "manage_options", "my_admin_page_slug", "my_admin_page_func" );
}
function my_admin_page_func() {
?>
<div class="wrap">
<h2>My Admin Page</h2>
<p>Hello world!</p>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment