summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php')
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php
index 5aebe8d3..afeb0781 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php
@@ -148,7 +148,11 @@ class WPCOM_JSON_API_Site_Settings_Endpoint extends WPCOM_JSON_API_Endpoint {
break;
case 'settings':
- $jetpack_relatedposts_options = Jetpack_Options::get_option( 'relatedposts' );
+ $jetpack_relatedposts_options = Jetpack_Options::get_option( 'relatedposts', array() );
+ // If the option's enabled key is NOT SET, it is considered enabled by the plugin
+ if ( ! isset( $jetpack_relatedposts_options['enabled'] ) ) {
+ $jetpack_relatedposts_options['enabled'] = true;
+ }
if ( method_exists( 'Jetpack', 'is_module_active' ) ) {
$jetpack_relatedposts_options[ 'enabled' ] = Jetpack::is_module_active( 'related-posts' );