我在一個單獨的字段中創建了兩個小的wordpress插件。該菜單標題顯示在管理頁面的設置下因爲我創建了這個像如何檢查函數名稱,如果已經存在於wordpress中?
add_submenu_page('options-general.php','Fantastic Copyright by FantasticPlugins.com', 'Fantastic Copyright', 'manage_options', 'copyright_admin', 'copyright_admin_page');
這是管理員端的屏幕截圖。
現在我想在一個共同的菜單,可以顯示我的各個插件。即使我試圖創建菜單和插件的子菜單,我谷歌搜索和添加。
add_menu_page('My Test Plugin Settings', 'Test Plugin',IC_MYPLUGIN_PERMISSIONS,"my-plugin-slug", "ic_myplugin_settings",plugins_url('fp.ico', __FILE__));
// create a new submenu
add_submenu_page(
"my-plugin-slug",
__("This is page title for the page"),
__("Settings"),
IC_MYPLUGIN_PERMISSIONS,
"my-plugin-slug",
"ic_myplugin_settings"
);
add_submenu_page(
"my-plugin-slug",
__("This is page title for items page"),
__("Items"),
IC_MYPLUGIN_PERMISSIONS,
"my-plugin-slug-items",
"ic_myplugin_items"
);
add_submenu_page(
"my-plugin-slug",
__("This is page title for add item page"),
__("Add Item"),
IC_MYPLUGIN_PERMISSIONS,
"my-plugin-slug-add-item",
"ic_myplugin_add_item"
);
}
從圖片測試插件是常見的菜單中,我們創建的手動子菜單。現在我需要知道如何將單個插件添加到測試插件的子菜單頁面。我需要使菜單獨立。例如,如果我創建WordPress的插件。在此我們創建圖像庫作爲單獨的插件和視頻庫作爲單獨的插件。
Wordpress --> Is the Main Menu
Image Gallery --> Is the sub Menu and Seperate Plugin
Video Gallery --> Is the sub menu and seperate Plugin
就像我需要顯示。無論我爲wordpress創建插件,都會在wordpress的常用主菜單下進行。任何一個告訴我,我怎麼能做這個東西?
你試圖把你的測試插件的神奇版權? – anstrangel0ver 2013-04-11 10:40:27
是@ anstrangel0ver我該怎麼做? – 2013-04-11 10:43:49