modules/likes/jetpack-likes-settings.php 1 location
|
@@ 332-336 (lines=5) @@
|
329 |
|
|
330 |
|
if ( $post instanceof WP_Post ) { |
331 |
|
// Check that the post is a public, published post. |
332 |
|
if ( 'attachment' == $post->post_type ) { |
333 |
|
$post_status = get_post_status( $post->post_parent ); |
334 |
|
} else { |
335 |
|
$post_status = $post->post_status; |
336 |
|
} |
337 |
|
if ( 'publish' != $post_status ) { |
338 |
|
$enabled = false; |
339 |
|
} |
modules/widgets/top-posts.php 1 location
|
@@ 642-644 (lines=3) @@
|
639 |
|
* To be able to remove attachment pages from private and password protect posts, |
640 |
|
* we need to replace their post status by the parent post' status. |
641 |
|
*/ |
642 |
|
if ( 'inherit' == $post->post_status && 'attachment' == $post->post_type ) { |
643 |
|
$post->post_status = get_post_status( $post_id ); |
644 |
|
} |
645 |
|
|
646 |
|
// hide private and password protected posts |
647 |
|
if ( 'publish' != $post->post_status || ! empty( $post->post_password ) ) { |