Support » Plugin: Protect the Children! » Doesn’t work with nested child pages?

  • Resolved simonwimell

    (@simonwimell)


    This plugin seem to work as intended for direct children of a password protected page, but grandchild pages are still accessible without password. Is this intended? I want all levels below a password protected page to be password protected.

Viewing 4 replies - 1 through 4 (of 4 total)
  • A suggestion is to replace

    $parent_id = wp_get_post_parent_id($post_id);

    with

    $parent_id = get_post_ancestors($post_id);

    on line 35 of index.php

    and $parent_post = protectTheChildrenEnabled($parent_id);

    with

    foreach ($parent_id as $id) { $parent_post = protectTheChildrenEnabled($id); }

    on line 40 of index.php.

    That should work, right?

    Plugin Author MillerMediaNow

    (@millermedianow)

    Hi @simonwimell,
    That’s a great thought. Thanks for the note. Let me do some QA with that code and see if that will work but on the surface it appears that it will. I’ll keep you updated as I look into it. Thanks!

    Plugin Author MillerMediaNow

    (@millermedianow)

    There are several other places in the code that need to be updated so we’re working on this now and should hopefully have a new version out this evening. Thanks so much for your help!

    Plugin Author MillerMediaNow

    (@millermedianow)

    New version has been updated. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn’t work with nested child pages?’ is closed to new replies.