summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
committerYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
commit2ab16973706e120bc344c83be6295b54fd908c57 (patch)
tree358267a52d9542c77c90e3663cea32d13b8cb639 /plugins/jetpack/sal/class.json-api-post-base.php
parentUpdate twentysixteen 1.7 (diff)
downloadblogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.gz
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.bz2
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.zip
Updating packages for 5.1.1
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/sal/class.json-api-post-base.php')
-rw-r--r--plugins/jetpack/sal/class.json-api-post-base.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/jetpack/sal/class.json-api-post-base.php b/plugins/jetpack/sal/class.json-api-post-base.php
index 74f7d983..4ee02cc1 100644
--- a/plugins/jetpack/sal/class.json-api-post-base.php
+++ b/plugins/jetpack/sal/class.json-api-post-base.php
@@ -413,12 +413,9 @@ abstract class SAL_Post {
public function is_likes_enabled() {
/** This filter is documented in modules/likes.php */
$sitewide_likes_enabled = (bool) apply_filters( 'wpl_is_enabled_sitewide', ! get_option( 'disabled_likes' ) );
- $post_likes_switched = (bool) get_post_meta( $this->post->ID, 'switch_like_status', true );
- $post_likes_enabled = $sitewide_likes_enabled;
- if ( $post_likes_switched ) {
- $post_likes_enabled = ! $post_likes_enabled;
- }
- return (bool) $post_likes_enabled;
+ $post_likes_switched = get_post_meta( $this->post->ID, 'switch_like_status', true );
+
+ return $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );
}
public function is_sharing_enabled() {