Forum Replies Created

Viewing 15 replies - 16 through 30 (of 34 total)
  • Plugin Author andyexeter

    (@andyexeter)

    Hey conradish,

    That functionality doesn’t currently exist in the plugin I’m afraid.

    It sounds like a good idea for a feature toggle though, so I’ll look at implementing it when I get some free time and will update this thread when it has been released 😊

    Plugin Author andyexeter

    (@andyexeter)

    Hi @dgibb,

    It sounds like you have added your pages to the protected list, not the locked list.

    Protected posts are those which can still be edited, but cannot be trashed/deleted by non admins. Locked posts cannot be edited, trashed or deleted.

    If you go to the plugin settings page, make sure the pages are in the Locked list (the top one), and not the Protected list.

    Plugin Author andyexeter

    (@andyexeter)

    Hey dgibb,

    I have looked into this but I am unable to replicate your issue. On a clean install of WordPress, using the twentytwenty theme and having PostLockdown installed as the only plugin, adding pages to the Locked list locks them as expected.

    Is it possible that you have some other plugin or some theme code which is manipulating user capabilities? PostLockdown works by checking that the user has the ‘manage_options’ capability – if they have this capability they are classed as an admin and bypass all checks. There may be something on your install which is giving Editors that capability for pages.

    Of course I am just speculating here and this may not be the exact issue.

    If you are able to replicate this issue on a clean install (default theme, no other plugins) I am happy to look into it further.

    Thanks, Andy

    Same issue here. Line 1723 of cookie-notice.php is:

    if ( ! is_bool( $options[$param] ) )

    The code makes the incorrect assumption of the existence of all old parameters. The fix is to add an isset check first:

    if ( isset( $options[$param] ) && ! is_bool( $options[$param] ) )

    Downgrading the plugin is your best bet until the author(s) fix this.

    Plugin Author andyexeter

    (@andyexeter)

    Hey fancyfanta,

    I’ve just released version 2.1 of the plugin which allows you to protect and lock attachments πŸ™‚

    Plugin Author andyexeter

    (@andyexeter)

    Hey Marc,

    The best solution I can think of would be to assign the user to a new role which has all capabilities of an administrator, then create a new capability for administrators only. Perhaps something like manage_options_and_kb_posts.

    Once the new role and capability are created you would then use the postlockdown_admin_capability filter to use the new capability rather than the default manage_options:

    
    add_filter('postlockdown_admin_capability', function() {
        return 'manage_options_and_kb_posts';
    });
    

    I have used the User Role Editor plugin for managing user roles and capabilities in the past and it seemed to work pretty well.

    Let me know how you get on!

    Thread Starter andyexeter

    (@andyexeter)

    Thanks nigro, I did find the community version but it doesn’t seem like changes to that version make it in to the official plugin?

    Forum: Reviews
    In reply to: [Post Lockdown] Now perfect
    Plugin Author andyexeter

    (@andyexeter)

    Hey shawfactor,

    I just wanted to let you know that private posts/pages are now able to be marked as protected or locked in the latest version of the plugin! (2.0.3)

    Plugin Author andyexeter

    (@andyexeter)

    Hey shawfactor,

    I posted a reply on your review, not realising you had posted a support thread here. My reply can be seen here: https://ww.wp.xz.cn/support/topic/almost-perfect-316/#post-9559050 but for pragmatism, to show private pages/posts all you need to do is:

    add_filter('postlockdown_get_posts', function($args) {
        $args['post_status'][] = 'private';
        return $args;
    });
    Forum: Reviews
    In reply to: [Post Lockdown] Now perfect
    Plugin Author andyexeter

    (@andyexeter)

    Hey shawfactor,

    Thanks for your review and feedback.

    I agree that private posts/pages should show up in the search and I will update the plugin to do that as soon as I have time.

    In the meantime, you can modify the args that the plugin uses to get posts and pages for the search using the postlockdown_get_posts filter:

    add_filter('postlockdown_get_posts', function($args) {
        $args['post_status'][] = 'private';
        return $args;
    });

    This isn’t tested but should work and pull through private posts/pages πŸ™‚

    Plugin Author andyexeter

    (@andyexeter)

    Hi PetrP,

    The plugin works on capabilities rather than roles. It classes an admin as someone who has the manage_options capability but this can be filtered with the postlockdown_admin_capability filter:

    add_filter('postlockdown_admin_capability', function() {
        return 'some_other_capability';
    });
    Plugin Author andyexeter

    (@andyexeter)

    Hi Robswaimea,

    Sorry I haven’t replied sooner, I didn’t get a notification that you’d posted.

    I had a look into the plugin in question and I believe you’re right, they appear to handle managing/deleting of events internally using their own custom capabilities.

    If the plugin was to pass in the associated object_id with its calls to current_user_can, then you could get around this by filtering the capabilities Post Lockdown looks for with something like:

    
    add_filter('postlockdown_capabilities', function($caps) {
        $caps['delete_events'] = true;
        $caps['edit_events'] = true;
        return $caps;
    });
    

    However, this won’t work right now because they’re just calling current_user_can('delete_events') with no context, so Post Lockdown can’t lookup the associated object_id and see if it is locked or protected.

    It may be worth reaching out to the maintainers of the events plugin and asking if they can add the object ID into their calls to current_user_can.

    • This reply was modified 8 years, 11 months ago by andyexeter.
    Plugin Author andyexeter

    (@andyexeter)

    Hey Sebastian,

    I know it’s been a while, but I just wanted to let you know that I’ve released version 2.0 of the plugin today.

    The plugin now adds a status column to post lists so you’re easily able to see which are locked and which are protected. The column is hidden by default for users who haven’t already hidden any columns on the screen, so any user that wants to see the column needs to enable it under the “Screen Options” tab. Alternatively, you can use the new postlockdown_column_hidden_default filter and return false from it so that all users see the column without enabling it:

    add_filter( 'postlockdown_column_hidden_default', '__return_false' );

    I hope this helps, and if you have a couple of spare minutes I’d really appreciate it if you could review the plugin.

    Thanks, Andy

    Plugin Author andyexeter

    (@andyexeter)

    Hey Sebastian,

    Thanks for your message. I really like the idea, I’m a bit tied up with paid work at the moment but this is something I would like to implement.

    Version 2 of the plugin has been in the pipeline for a while now, but I think I’m going to add this feature in before I release it.

    I think icons are a better way to go than text, and I think I’ll make this an opt-in feature as some people who already use the plugin might not want to see any changes to their post/page lists.

    Thanks again for the message, I’ll let you know when the new version is released πŸ™‚

    There should definitely be an option to disable this in the core

    Asking people to install a plugin to disable it is like asking people to install a plugin to change their blog timezone, or admin email

    There’s already an option to “Convert emoticons like πŸ™‚ and πŸ˜› to graphics on display” in Settings > Writing. Why not add another option which when ticked just removes the actions/filters like the plugin does

Viewing 15 replies - 16 through 30 (of 34 total)