Support » Plugin: All-in-One Video Gallery » Give permission for editors to use Automations

  • Resolved ibalawi

    (@ibalawi)


    hello , how can i give a specific user group ( like editors ) to use Automations function ?

    Regards

Viewing 1 replies (of 1 total)
  • Plugin Contributor wpvideogallery

    (@wpvideogallery)

    Kindly try adding the following code to the bottom of your theme’s functions.php file.

    function override_aiovg_automations_post_type_args( $args, $post_type ) {
        if ( 'aiovg_automations'!== $post_type ) {
            return $args;
        }
    
        if ( current_user_can( 'edior' ) || current_user_can( 'author' ) || current_user_can( 'contributor' ) ) { // Add your user roles here
            $args['show_in_menu'] = 'edit.php?post_type=aiovg_videos';
           
        }
     
        return $args;
    }
    
    add_filter( 'register_post_type_args', 'override_aiovg_automations_post_type_args', 11, 2 );

    Hope this solved your issue!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.