Forum Replies Created

Viewing 15 posts - 796 through 810 (of 2,522 total)
  • Author
    Posts
  • in reply to: Shortcode restriction within page builder #5861
    Vladimir
    Keymaster

    Hi,

    I tested with WP Bakery Page Builder (former Visual Composer) and shortcode works for me. Do not forget that it works for for the text/content parts only.
    Re-check if you input shortcode in the text mode (not visual). Try to place shortcode parts at the new lines, like here:

    
    [user_role_editor roles="editor"]
    Test Post 300 - for editors only
    [/user_role_editor]
    

    Builder may replace parts of shortcode in other cases.

    in reply to: Additional Options: Hide admin bar #5858
    Vladimir
    Keymaster

    Hi Sheila,

    Hiding admin bar should not prevent access to the wp-admin. I suppose that you have some plugin which has option like ‘prevent access to wp-admin’ in its settings. Try to deactivate all plugins. Will user with such custom role get access to wp-admin? If ‘Yes’, then activate plugins back one by one with new test in order to isolate one which causes a problem.

    Vladimir
    Keymaster

    Thanks for letting me know that you found an answer.

    in reply to: Screen Options #5856
    Vladimir
    Keymaster

    Hi Barry,

    Thanks for the feedback.

    URE does not include UI to turn ON for a role selected screen option (or in other words, show meta box). You can use this code though:

    
    /**
     * Turn ON 'Slug' screen option for user with 'author' role at the Media Library item (attachment) edit page
     */
    add_filter( 'hidden_meta_boxes', 'show_slug_metabox', 10, 3 );
    
    function show_slug_metabox( $hidden, $screen, $use_defaults ) {
    
        if ( $screen->id!=='attachment') {
            return $hidden;
        }
        
        $user = wp_get_current_user();
        if ( empty( $user) || empty( $user->roles ) ) {
            return $hidden;
        }
        if ( !in_array( 'author', $user->roles ) ) {
            return $hidden;
        }
        
        $slug_key = array_search( 'slugdiv', $hidden );
        if ( $slug_key !== false ) {
            unset( $hidden[ $slug_key ] );
        }
    
        return $hidden;
    }
    

    Change ‘author’ to your own role ID and setup this code as a Must Use plugin.

    in reply to: Permission to view user profile custom fields #5854
    Vladimir
    Keymaster

    “User Registration” plugin shows extra fields at back-end user profile only to a user with ‘manage_options’ capability:

    
    public function show_user_extra_fields( $user ) {
    	if ( ! current_user_can( 'manage_options' ) ) {
    		return;
    	}
    
    	$show_fields = $this->get_user_meta_by_form_fields( $user->ID );
    ...
    
    in reply to: Hide Add Page Link? #5852
    Vladimir
    Keymaster

    Hi,

    WordPress by default uses the same ‘edit_pages’ capability for both “edit” and “add new” buttons. In order to change this go to “Settings->User Role Editor->Additional Modules” tab and turn on the “Activate “Create” capability for posts/pages/custom post types” option. URE will reconfigure WordPress to use ‘create_pages’ for ‘add new’ button as a result.

    Take into account that URE automatically grants ‘create_posts’ and ‘create_pages’ capabilities to the ‘administrator’ role only. You may need to re-check your roles (contributor, author, editor and others) to ensure users don’t lose ‘add new’ functionality where they should have it.

    in reply to: Add additional role to multisite users #5842
    Vladimir
    Keymaster

    Hi,

    May be this code will give a starting point:

    
    if (is_multisite()) {
        add_action( 'wpmu_activate_user', 'add_secondary_role', 10, 1 );
    } else {
        add_action( 'user_register', 'add_secondary_role', 10, 1 );
    }
    
     
    function add_secondary_role( $user_id ) {
     
        $user = get_user_by('id', $user_id);
        $user->add_role('custom_role_id');
     
    }
    

    I will be out of office until July 31st.

    in reply to: Woffice access to forum editing #5841
    Vladimir
    Keymaster

    Got it. Thanks.
    I will proceed with subject investigation from July 31st, when return from a small journey.

    Vladimir
    Keymaster

    Yes, URE works with edit restrictions by term ID exactly this way, as you described.

    Thank you for the suggestion. I will take it into account with one of the future updates.

    in reply to: Page/Post Editor Restrictions #5829
    Vladimir
    Keymaster

    Sure, URE does not restrict access to content for users with ‘administrator’ role, thus, it does not show “Posts/pages edit restrictions” section at such user profile.

    If you need apply edit restrictions for such power user, grant him custom role with less permissions.

    Vladimir
    Keymaster

    Hi,

    Thanks for the good feedback.
    You can use the ure_auto_access_child_pages custom filter to exclude automatic adding off child pages to the list of restricted pages.

    in reply to: Page/Post Editor Restrictions #5824
    Vladimir
    Keymaster

    “Page/Post Editor Restrictions” is shown at user profile only for user who really can edit posts and/or pages. Thus,
    1st, provide for a user edit access to the pages which you plan to allow him to edit.
    2nd, add edit restriction criteria.

    in reply to: Divi Theme Options? #5820
    Vladimir
    Keymaster

    Did you block any post meta boxes for this role? If Yes, try to remove blocking and make another test. If that will help you can play with meta boxes one by one to isolate which meta box blocking causes this JS error.

    in reply to: Divi Theme Options? #5818
    Vladimir
    Keymaster

    My test showed that user with custom role, which includes just ‘edit_posts’, ‘publish_posts’, ‘edit_published_posts’ sees and can use “Use the Divi Builder” button at the back-end post editor page.

    Divi builder uses JavaScript intensively. I suppose that some JavaScript error may take place in the post editor page. Look at the browser JavaScript console for the critical red colored error messages.

    in reply to: Woffice access to forum editing #5817
    Vladimir
    Keymaster

    It seems that Woffice has updated user interface for bbPress with extended functinality. Can get access to its copy for testing? If Yes, share it via DropBox or similar with support [at-sign] role-editor.com

Viewing 15 posts - 796 through 810 (of 2,522 total)