• Hi,
    I need to give a user the ability to set a slug in his posts, but I don’t want to give him the “publish_posts” permission.
    How can I do that?
    Thanks.

Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    WordPress developers decided to prohibit this functionality for contributors. This is a code from WordPress core wp-admin/edit-form-advanced.php, line #308:

    
    if ( ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) )
    	add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', null, 'normal', 'core');
    
    

    That is post should not be in the ‘pending for review’ status and current user should can ‘publish_posts’ capability to get access to the edit post tag functionality.

    The only workaround – an own plugin which will add ‘post_slug_meta_box’ meta box to the post editor page under extended (your own) conditions.

Viewing 1 replies (of 1 total)

The topic ‘Edit slug without “publish_posts”’ is closed to new replies.