doudang1890
2016-06-17 17:32
浏览 8
已采纳

允许店铺经理使用革命滑块


Which attribute shall I insert to this function in order to allow the shop manager to use the revolution slider plugin?
I tried this code but it doesn't work!

function add_theme_caps() {
    $role = get_role( 'shop_manager' );
    $role->add_cap( 'edit_rev_slider' ); 

}
add_action( 'admin_init', 'add_theme_caps');

Thank you in advance.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doulu8415 2016-06-17 19:09
    已采纳

    You can't use anymore this kind of tricks with Revolution slider, because it handle this himself.

    You need to go in the global settings of this plugin (a little button in top right when you are on main Revolution Slider backend page) and change the authorized user roles from Admin to Editor, Admin or Author, Editor, Admin.

    This way the Shop Manager user role will have access to Revolution Slider settings.

    点赞 打赏 评论