mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
Place options page under 'Settings' in stead of 'Plugins' menu
This commit is contained in:
parent
1d4de289b6
commit
7f293f8375
1 changed files with 8 additions and 2 deletions
|
@ -296,13 +296,19 @@ class Plugin_Name {
|
||||||
public function add_plugin_admin_menu() {
|
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:
|
* TODO:
|
||||||
*
|
*
|
||||||
* Change 'Page Title' to the title of your plugin admin page
|
* 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 '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)
|
* 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 ),
|
__( 'Page Title', $this->plugin_slug ),
|
||||||
__( 'Menu Text', $this->plugin_slug ),
|
__( 'Menu Text', $this->plugin_slug ),
|
||||||
'manage_options',
|
'manage_options',
|
||||||
|
@ -330,7 +336,7 @@ class Plugin_Name {
|
||||||
|
|
||||||
return array_merge(
|
return array_merge(
|
||||||
array(
|
array(
|
||||||
'settings' => '<a href="' . admin_url( 'plugins.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>'
|
'settings' => '<a href="' . admin_url( 'options-general.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>'
|
||||||
),
|
),
|
||||||
$links
|
$links
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue