modules/likes/jetpack-likes-settings.php 1 location
|
@@ 301-305 (lines=5) @@
|
298 |
|
|
299 |
|
if ( $post instanceof WP_Post ) { |
300 |
|
// Check that the post is a public, published post. |
301 |
|
if ( 'attachment' == $post->post_type ) { |
302 |
|
$post_status = get_post_status( $post->post_parent ); |
303 |
|
} else { |
304 |
|
$post_status = $post->post_status; |
305 |
|
} |
306 |
|
if ( 'publish' != $post_status ) { |
307 |
|
$enabled = false; |
308 |
|
} |
modules/widgets/top-posts.php 1 location
|
@@ 576-578 (lines=3) @@
|
573 |
|
* To be able to remove attachment pages from private and password protect posts, |
574 |
|
* we need to replace their post status by the parent post' status. |
575 |
|
*/ |
576 |
|
if ( 'inherit' == $post->post_status && 'attachment' == $post->post_type ) { |
577 |
|
$post->post_status = get_post_status( $post_id ); |
578 |
|
} |
579 |
|
|
580 |
|
// hide private and password protected posts |
581 |
|
if ( 'publish' != $post->post_status || ! empty( $post->post_password ) ) { |