wordpress中如何用User Role Editor修改使用Meta Slider的权限

1、添加以下代码添加到functions.php

/**
 * You can change this to a different capability by pasting the code below into
 * your themes functions.php file.
 *
 * You can use the 'User Role Editor' plugin to add a custom capability to WordPress
 * specifically for Meta Slider users.
 */
function metaslider_change_required_role($capability) {
    return 'metaslider_use'; // this is the ID of a custom capability added using User Role Editor
}
add_filter('metaslider_capability', 'metaslider_change_required_role');

2、打开 用户User Role Editor
3、选择要修改权限用的角色
4、点击 Add Capability 添加 metaslider_use,然后钩选该属性
5、点击 UpdateYes