wp plugin -15

Creating a Top - Level Menu

add_menu_page( page_title, menu_title, capability, menu_slug, function, icon_url, position );

page_title — The title of the page as shown in the <title> tags

menu_title — The name of your menu displayed on the dashboard

capability — Minimum capability required to view the menu

menu_slug — Slug name to refer to the menu; should be a unique name

function : Function to be called to display the page content for the item

icon_url — URL to a custom image to use as the Menu icon

position — Location in the menu order where it should appear

 

Adding a Submenu

add_submenu_page( parent_slug, page_title, menu_title, capability, menu_slug, function );

parent_slug : Slug name for the parent menu ( menu_slug previously defi ned)

page_title : The title of the page as shown in the <title> tags

menu_title : The name of your submenu displayed on the dashboard

capability : Minimum capability required to view the submenu

menu_slug : Slug name to refer to the submenu; should be a unique name

function : Function to be called to display the page content for the item

 

Adding a Menu Item to an Existing Menu

add_options_page( page_title, menu_title, capability, menu_slug, function),  add a submenu item to the Settings menu

page_title — The title of the page as shown in the <title> tags

menu_title — The name of your submenu displayed on the dashboard

capability — Minimum capability required to view the submenu

menu_slug — Slug name to refer to the submenu; should be a unique name

function — Function to be called to display the page content for the item

 

Others:

add_dashboard_page — Adds a submenu to the Dashboard menu

add_posts_page — Adds a submenu to the Posts menu

add_media_page — Adds a submenu to the Media menu

add_links_page — Adds a submenu to the Links menu

add_pages_page — Adds a submenu to the Pages menu

add_comments_page — Adds a submenu to the Comments page

add_theme_page — Adds a submenu to the Appearance menu

add_plugins_page — Adds a submenu to the Plugins menu

add_users_page — Adds a submenu to the Users menu

add_management_page — Adds a submenu to the Tools menu

add_options_page — Adds a submenu to the Settings menu

 

posted on 2012-12-04 14:15  kalintw  阅读(101)  评论(0)    收藏  举报

导航