Definition:
function twentyeleven_theme_options_add_page() {}
Add our theme options page to the admin menu, including some help documentation.
This function is attached to the admin_menu action hook.
Source code
function twentyeleven_theme_options_add_page() { $theme_page = add_theme_page( __( 'Theme Options', 'twentyeleven' ), // Name of page __( 'Theme Options', 'twentyeleven' ), // Label in menu 'edit_theme_options', // Capability required 'theme_options', // Menu slug, used to uniquely identify the page 'twentyeleven_theme_options_render_page' // Function that renders the options page ); if ( ! $theme_page ) return; add_action( "load-$theme_page", 'twentyeleven_theme_options_help' ); }
14755
No comments yet... Be the first to leave a reply!