/* # sample code # Considering the simplest plugin code bellow: ================= Login with your admin username, and you will be able to save those settings to database. Now login with any EDITOR level user, and try to save the settings. You will get the message "Cheatin’ uh?" on yourdomain.com/wp-admin/options.php Also noticed that the level 5 was defined so editors should be able to save that with no problems at all. */ function my_theme_menu() { add_submenu_page('index.php', 'Homepage', 'Homepage', 5, 'homepage', 'homepage'); } add_action('admin_menu', 'my_theme_menu'); function homepage() { if ( $_REQUEST['updated'] ) echo '
Homepage settings saved.