Forum Replies Created

Viewing 15 posts - 2,251 through 2,265 (of 2,506 total)
  • Author
    Posts
  • in reply to: Restrict editing pages by user role? #1711
    Vladimir
    Keymaster

    AntKat,
    This is a version of code modified to work with a list of pages slugs:

    
    add_action('pre_get_posts', 'restrict_posts_list');
    
    function restrict_posts_list($query) {
    
        if ( !(is_blog_admin() && current_user_can('editor')) ) {
            return $query;
        }
        $suppressing_filters = $query->get('suppress_filters'); // Filter suppression on?
    
        if ($suppressing_filters) {
            return query;
        }
    
        if ($query->query['post_type']=='page') {            
            $posts_restriction_type = 2; // Prohibit
            $posts_slugs = array(
                'jobs',
                'post-to-our-blog',
                'sample-page'
            );
            $posts_list = array();  // comma separated list of pages IDs
            foreach($posts_slugs as $post_slug) {
                $page = get_page_by_path($post_slug);
                if ($page) {
                    $posts_list[] = $page->ID;   
                }
            }
            if (empty($posts_list)) {
                return $query;
            }
            if ($posts_restriction_type==1) {   // Allow
                $query->set('post__in', $posts_list);
            } else {    // Prohibit
                $query->set('post__not_in', $posts_list);
            }
        }
    
        return $query;
    }
    // restrict_posts_list()
    
    in reply to: FSQM #1708
    Vladimir
    Keymaster

    List of custom user capabilities used at the FSQM menu:
    Menu Item Capability
    FSQM Pro view_feedback
    Dashboard view_feedback
    View all Forms manage_feedback
    New Form manage_feedback
    Import/Export Forms manage_feedback
    Form Category manage_feedback
    Report & Analysis view_feedback
    View a Submission view_feedback
    View all Submissions manage_feedback
    Settings manage_feedback

    in reply to: FSQM #1707
    Vladimir
    Keymaster

    Hi Tash,

    If it’s a paid product please send its copy to [email protected]
    I will use it at my localhost for the investigation purpose only.
    If it’s a plugin from WordPress repository send here its download link.

    in reply to: Do I need to install both Free and Pro versions? #1700
    Vladimir
    Keymaster

    Hi Helen,

    Pro version includes its own copy of a free version (or the core of a User Role Editor). So you can remove free version. The only thing that you should remember is that both versions (free and Pro) use the same place to store their settings data. So if you delete free version via WordPress Plugins Delete link, plugin will delete automatically its settings data. You will have to configure User Role Editor Pro Settings again after that.
    Right decision in your case is to delete free version folder (user-role-editor) via FTP not via WordPress.

    in reply to: Restrict editing pages by user role? #1698
    Vladimir
    Keymaster

    Hi,

    Thanks for letting me know. I will add it.

    in reply to: Editor role settings not displaying correctly #1696
    Vladimir
    Keymaster

    Hi Robert,

    Do not use “Block Not Selected” option if you should allow access to the “Posts” menu.
    ‘edit.php’ URL (which is needed to edit selected post) is obviously not selected at admin menu (as this link is not included to the menu) and thus it is blocked.
    I did not get to the conclusion (universal decision) how to resolve similar issues for this moment.

    Please try the development version 4.19.b7, which you can get after login from the same download page. It addresses some “Admin menu access” add-on issues related to those you described.

    Permanently I live in Russia (GMT+6). But currently and until the next weekend I’m in Czech Republic (GMT+2) and have access to the computer by the evenings only.

    Regards,
    Vladimir.

    in reply to: Wishlist Member #1691
    Vladimir
    Keymaster

    Fixed: I added role “Centre Management” to the “Wishlist Member”->Settings->Configuration->Miscellaneous->”WishList Member Page/Post Options Access”.

    in reply to: Wishlist Member #1689
    Vladimir
    Keymaster

    Hi,

    Thanks. I made successful test with custom role for the built-in post.
    Does this custom role see “Wishlist Member” content protection options for the built-in posts and does not see them for the custom post type only?

    in reply to: Wishlist Member #1687
    Vladimir
    Keymaster

    Hi,

    The known problem with custom roles is missed user levels:
    https://www.role-editor.com/wordpress-user-levels-deprecated-just-partially/

    If your custom role does not include “deprecated” user levels try to turn on the same levels set as an “Author” role contains. May be it will help you to resolve a problem.

    In other case I need “Wishlist Member” plugin copy to test it and find a reason of described problem. You may send it to [email protected]

    Vladimir
    Keymaster

    Hello,

    All fields in the “Posts/Pages/Custom Post Types Editor Restrictions” section including “with category/taxonomy ID (comma separated)” field are designed for the digital values input only. You should input digital IDs of a categories or taxonomies as a comma separated list. You should not input categories or taxonomies as a text. I confirm such input is ignored. I may add input filter for digits and commas only with one of the future updates.

    Vladimir
    Keymaster

    About your 2nd question
    I need this plugin copy to check its code, make tests and try to help you. Send its installation package to the [email protected]
    I will use it at my localhost for the testing purpose only.

    Vladimir
    Keymaster

    No problem. That’s fine that you found an answer for your question yourself.

    Vladimir
    Keymaster

    Hi Wolfgang,

    “Apply to All Sites” checkbox is available for the network activated User Role Editor, opened under Users menu of the main blog dashboard, not via Network admin. And user should be a super admin to see this option. Look on this screenshot:
    https://storage.googleapis.com/role-editor/downloads/support/ure-multisite-apply-to-all.png

    As I see “Network Update” button at your screenshot above – it was made under Network Admin, where this option is unavailable by design.

    Regards,
    Vladimir.

    Vladimir
    Keymaster

    Answer to question 1:
    If You press the ‘Update Network’ button while editing a custom role,
    1) You save changes of the custom role to the main blog;
    2) You overwrite all roles at all other sub-sites of your network with roles from your main blog. Of course after that you will lose all changes made to the roles at subsites.

    If you wish to apply to all sites a changes made to the custom role only, go to the main blog “Users”-“User Role Editor”, modify custom role there, click “Apply to All Sites” and then click “Update” button.

    P.S. I will try to answer on the question 2 tomorrow.

    Vladimir
    Keymaster

    Hi,
    ‘upload_files’ capability protects the “Media” menu and its items. “Editor” role includes it by default. Some plugin may modify this default settings. So if your editor can not access “Media Library”, try to deactivate all plugins and re-check if that helped.

Viewing 15 posts - 2,251 through 2,265 (of 2,506 total)