From 7f293f8375cbc56816bc14c1002d2b8bd1623be3 Mon Sep 17 00:00:00 2001 From: Barry Ceelen Date: Sat, 28 Sep 2013 13:38:39 +0200 Subject: [PATCH] Place options page under 'Settings' in stead of 'Plugins' menu --- plugin-name/class-plugin-name.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugin-name/class-plugin-name.php b/plugin-name/class-plugin-name.php index c694ee5..bef11bd 100644 --- a/plugin-name/class-plugin-name.php +++ b/plugin-name/class-plugin-name.php @@ -296,13 +296,19 @@ class Plugin_Name { public function add_plugin_admin_menu() { /* + * Add a settings page for this plugin to the Settings menu. + * + * NOTE: Alternative menu locations are available via WordPress administration menu functions. + * + * Administration Menus: http://codex.wordpress.org/Administration_Menus + * * TODO: * * Change 'Page Title' to the title of your plugin admin page * Change 'Menu Text' to the text for menu item for the plugin settings page * Change 'manage_options' to the capability you see fit (http://codex.wordpress.org/Roles_and_Capabilities) */ - $this->plugin_screen_hook_suffix = add_plugins_page( + $this->plugin_screen_hook_suffix = add_options_page( __( 'Page Title', $this->plugin_slug ), __( 'Menu Text', $this->plugin_slug ), 'manage_options', @@ -330,7 +336,7 @@ class Plugin_Name { return array_merge( array( - 'settings' => '' . __( 'Settings', $this->plugin_slug ) . '' + 'settings' => '' . __( 'Settings', $this->plugin_slug ) . '' ), $links );