twentyeleven_theme_options_add_page

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: