Wordpress自定义插件名称未显示在角色和功能插件中

时间:2016-09-22 06:58:33

标签: wordpress custom-post-type

使用插件用户角色编辑器

我使用插件为不同的用户分配角色和功能

但我的自定义插件名称在菜单列表中看不到(ex tablepress菜单在自定义帖子类型下有不同的列表)

当我点击核心功能/插件选项中的激活插件时(用户将获得激活或停用的所有访问权限)我的插件会显示在我的信息中心的左侧。

如何将我的插件主菜单和子菜单放入该插件中。我可以单独分配给角色。

我应该使用此代码更改任何内容吗?

function custom_table_example_admin_menu()
{
  add_menu_page(__('Persons', 'custom_table_example'), __('Estuary Collaboration', 'custom_table_example'), 'activate_plugins', 'persons', 
  'custom_table_example_persons_page_handler');

  add_submenu_page('persons', __('Application', 'custom_table_example'), __('Application', 'custom_table_example'), 'activate_plugins', 'persons', 
  'custom_table_example_persons_page_handler');

// add new will be described in next part
  add_submenu_page('persons', __('Add new', 'custom_table_example'), __('Add new', 'custom_table_example'), 'activate_plugins', 'persons_form', 
  'custom_table_example_persons_form_page_handler');

//settings start
add_submenu_page('persons', __('Settings', 'custom_table_example'), __('Settings', 'custom_table_example'), 'activate_plugins', 'persons1_form', 
'custom_table_example_persons_form1_page1_handler1_setting');

}

add_action('admin_menu', 'custom_table_example_admin_menu');

0 个答案:

没有答案
相关问题