Skip to content

Commit

Permalink
1.2.3 - Parent post password bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerMedia committed Oct 5, 2018
1 parent 3d02ddd commit ba226b6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Protect the Children!
* Description: Easily password protect the child pages/posts of a post that is password protected.
* Version: 1.2.2
* Version: 1.2.3
* Author: Miller Media (Matt Miller)
* Author URI: www.millermedia.io
*/
Expand Down Expand Up @@ -42,7 +42,8 @@
if (!$parent_post)
return;

$parent_password = $parent_post->post_password;
$parent_post_object = is_int($parent_post) ? get_post($parent_post) : $parent_post;
$parent_password = $parent_post_object->post_password;

// Check the cookie (hashed password)
require_once ABSPATH . WPINC . '/class-phpass.php';
Expand Down

0 comments on commit ba226b6

Please sign in to comment.