diff --git a/projects/plugins/boost/app/data-sync/Cornerstone_Pages_Entry.php b/projects/plugins/boost/app/data-sync/Cornerstone_Pages_Entry.php index 3bb5cd880f785..79a4537469020 100644 --- a/projects/plugins/boost/app/data-sync/Cornerstone_Pages_Entry.php +++ b/projects/plugins/boost/app/data-sync/Cornerstone_Pages_Entry.php @@ -14,11 +14,12 @@ public function __construct( $option_key ) { $this->option_key = 'jetpack_boost_ds_' . $option_key; } - public function get( $fallback_value = false ) { - if ( $fallback_value !== false ) { - $urls = get_option( $this->option_key, $fallback_value ); - } else { - $urls = get_option( $this->option_key ); + public function get( $fallback_value = array() ) { + $urls = get_option( $this->option_key, array() ); + + if ( empty( $urls ) && ! empty( $fallback_value ) ) { + $urls = $fallback_value; + $this->set( $urls ); } return array_map( array( $this, 'transform_to_absolute' ), $urls ); diff --git a/projects/plugins/boost/app/lib/Cornerstone_Pages.php b/projects/plugins/boost/app/lib/Cornerstone_Pages.php index c6ea5a35a6bc8..8aa0b0e1378c2 100644 --- a/projects/plugins/boost/app/lib/Cornerstone_Pages.php +++ b/projects/plugins/boost/app/lib/Cornerstone_Pages.php @@ -18,7 +18,7 @@ public function setup() { } public function register_ds_stores() { - $schema = Schema::as_array( Schema::as_string() )->fallback( self::default_pages() ); + $schema = Schema::as_array( Schema::as_string() )->fallback( $this->default_pages() ); jetpack_boost_register_option( 'cornerstone_pages_list', $schema, new Cornerstone_Pages_Entry( 'cornerstone_pages_list' ) ); jetpack_boost_register_readonly_option( 'cornerstone_pages_properties', array( $this, 'get_properties' ) ); } diff --git a/projects/plugins/boost/changelog/update-cornerstone-pages-default-value b/projects/plugins/boost/changelog/update-cornerstone-pages-default-value new file mode 100644 index 0000000000000..b556e34ff7d54 --- /dev/null +++ b/projects/plugins/boost/changelog/update-cornerstone-pages-default-value @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Change to an unreleased feature + +