Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Change plugin permission

$
0
0

Replies: 0

The plugin is set up to use the capability of ‘manage_options’. However, I would like to allow Editors the ability to add/edit carousel posts. How do I change the plugin so that users with the ‘create_posts’ capability can manage carousels?

My attempt to the functions.php code is below:

add_filter('sp_wp_carousel_post_type_args', 'wp_carousel_editor_permission', 10, 2);
function wp_carousel_editor_permission($args, $post_type)
{
        $args['show_ui'] = 'create_posts';
    return $args;
}

Viewing all articles
Browse latest Browse all 59525

Trending Articles