summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php')
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php
index 4ff4a82b..ff3ada51 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-sharing-buttons-endpoint.php
@@ -139,7 +139,7 @@ abstract class WPCOM_JSON_API_Sharing_Button_Endpoint extends WPCOM_JSON_API_End
if ( $visibility_changed || $is_disabling ) {
// Remove from all other visibilities
foreach ( $blog_services as $service_visibility => $services ) {
- if ( $service_visibility !== $button['visibility'] || $is_disabling ) {
+ if ( $is_disabling || $service_visibility !== $button['visibility'] ) {
unset( $blog_services[ $service_visibility ][ $service_id ] );
}
}