Forum Replies Created

Viewing 15 posts - 2,146 through 2,160 (of 2,513 total)
  • Author
    Posts
  • in reply to: Only Super Administrator can change Admin Menu? #2029
    Vladimir
    Keymaster

    Hi Nigel,

    Thanks for the information. There is a mistake in the condition that prevents single admin from blocking menu items for himself. I will include a fix to the next update.
    As a quick fix you may open user-role-editor-pro/includes/pro/classes/admin-menu-view.php and replace line #133

    
    $readonly_mode = (!$lib->multisite && $allowed_roles[0]=='administrator') || ($lib->multisite && !is_super_admin()); 
    

    with this one:

    
    $readonly_mode = (!$lib->multisite && $allowed_roles[0]=='administrator') || ($lib->multisite && !is_super_admin() && $allowed_roles[0]=='administrator'); 
    
    Vladimir
    Keymaster

    Hi Josh,

    Unfortunately, this feature is not available right now. But I hope to provide it in the near future.

    in reply to: Activating User Role Editor Pro breaks my website #2027
    Vladimir
    Keymaster

    Hi Nancy,

    Thanks for the feedback.

    in reply to: Activating User Role Editor Pro breaks my website #2022
    Vladimir
    Keymaster

    Hi Nancy,

    Thanks for the information. I will enhance this part of the code and include it to the next update.

    It seems that WP_DEBUG constant is set to true at your site. It’s not recommended for the live sites. So 1st workaround is to set it to false at wp-config.php file.
    2nd way is to modify wp-content/plugins/user-role-editor-pro/includes/pro/classes/other-roles.php file replacing code phragment at lines 72-89 with this one:

    
            if (is_array($user->roles)) {
                foreach ($user->roles as $role) {
                    if (isset($access_data[$role])) {
                        if (!isset($access_data[$role]['access_model'])) { // for backward compatibility
                            $access_model = 1;   // Use default (block selected) access model
                            $data = $access_data[$role];
                        } else {
                            $access_model = $access_data[$role]['access_model'];
                            $data = $access_data[$role]['data'];
                        }
                        if (empty($blocked['access_model'])) {  
                            $blocked['access_model'] = $access_model;    // take the 1st found role's access model as the main one                    
                        }
                        // take into account data with the same access model only as the 1st one found
                        if ($access_model==$blocked['access_model']) {
                            $blocked['data'] = array_merge($blocked['data'], $data);
                        }
                    }
                }
            }
    

    That is insert
    if (is_array($user->roles)) { just before it. And insert closing } just after it.
    I may send a modified file to your e-mail if it’s required.

    Vladimir
    Keymaster

    Hi Bira,

    This add-on does not give to a user new permission. It setups restrictions for the existing permissions only. So it should not allow to edit others posts until user actually has ‘edit_others_posts’ capability.

    Some sites has tens thousands of users. Creation of unique term for every user is not very effective solution…

    in reply to: "Activate Administrator Menu Access module" bug #2017
    Vladimir
    Keymaster

    Hi Urs,

    I confirm the described bug. Thanks for reporting it.
    I will search a solution.

    Vladimir
    Keymaster

    Hello,

    Is the same problem happened for the built-in role, like ‘author’?
    Try to deactivate all plugins and check? If problem will go away, activate plugins back one by one to isolate a problematic code.

    Vladimir
    Keymaster

    Hi Bira,

    In my opinion, the correct way to solve this issue is for you to create a custom taxonomy called “ure” (for example) which has a single term called “allow” — and you assign THAT term to any new post by that user. This way, this term will never be deleted by any other plugin or function, your custom taxonomy is hidden and doesn’t clash with existing taxonomies, and by adding THAT you will ensure a user can always add posts even before or without setting the taxonomy he’s restricted to.

    Thank you for the brilliant idea and useful note about wp_set_post_terms() function. Proposed decision allows to add new post without visible term assigned. This allows to have an option to “start a new post without any taxonomy” too.

    I will apply this enhanced logic to the next update. Thanks again.

    Vladimir
    Keymaster

    The fix for this issue was included into the version 4.23. Did you test with it?

    in reply to: Update from Dashboard #2003
    Vladimir
    Keymaster

    Good. Thanks for the feedback.

    in reply to: user role "none"? #2002
    Vladimir
    Keymaster

    In relation to ‘shortcode’ this feature was realized:

    Shortcode for content view access restriction


    Posts view restrictions includes a similar option ‘No role for this site’ also:

    Content view access restriction for selected roles

    I’m not sure that this add-on will work with BuddyPress though. I did not tested URE Pro with BuddyPress yet. It works with posts, pages and any custom post type. If BuddyPress page is a ‘post type’ like others then it should do the trick.

    I should look at BuddyPress and make some tests to be sure.

    in reply to: Update Pages by Review #1998
    Vladimir
    Keymaster

    Try this code:

    
    add_action('save_post', 'submit_for_review_update', 25 );
    
    function submit_for_review_update($post_id) {
        
        if (empty($post_id)) {
            return;
        }
        
        $post = get_post($post_id);
        if (!is_object($post)) { 
            return;
        }
    
        if ($post->post_type=='revision') {
           return;
        }
        
        $current_user = wp_get_current_user();    
        if (in_array('author', $current_user->roles) && $post->post_status=='publish') {
            $my_post = array(
                'ID' => $post_id,
                'post_status' => 'pending',
            );
    
            remove_action('save_post', 'submit_for_review_update', 25);
            wp_update_post($my_post);
            add_action('save_post', 'submit_for_review_update', 25);
        }
    }
    
    in reply to: plugin-update-checker.php #1997
    Vladimir
    Keymaster

    Hello,

    This part was not changed from a very begin. Method PucFactory::addVersion() is defined at the same file, line #1041. I suppose you may have installed another version of class PucFactory, as it’s defined here just in condition that it does not exist yet, line #963:

    
    if ( !class_exists('PucFactory') ):
    

    Could you please check, what other plugin causes this conflict?

    Vladimir
    Keymaster

    Hi Bira,

    Thanks for letting me know that a problem was resolved.

    Especially thank you for the bug report (user-role-editor-pro/includes/pro/classes/posts-edit-access.php on line 171). I really used a wrong class name there. I will fix it with a next update.

    in reply to: Update from Dashboard #1990
    Vladimir
    Keymaster

    Hi,

    I found and fixed the bug with plugin update from the WordPress multisite “Network Admin – Plugins” page. I will include this fix into the next update.

Viewing 15 posts - 2,146 through 2,160 (of 2,513 total)