diff --git a/projects/plugins/jetpack/changelog/add-option-to-sites-api b/projects/plugins/jetpack/changelog/add-option-to-sites-api new file mode 100644 index 0000000000000..e06acc3799f0b --- /dev/null +++ b/projects/plugins/jetpack/changelog/add-option-to-sites-api @@ -0,0 +1,4 @@ +Significance: minor +Type: other + +Add new option to site options api diff --git a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php index 1b844326cd2d1..43e738dcf68a1 100644 --- a/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php +++ b/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php @@ -211,6 +211,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint { 'blogging_prompts_settings', 'launchpad_screen', 'launchpad_checklist_tasks_statuses', + 'migration_source_site_domain', 'wpcom_production_blog_id', 'wpcom_staging_blog_ids', 'can_blaze', @@ -902,6 +903,9 @@ protected function render_option_keys( &$options_response_keys ) { case 'launchpad_checklist_tasks_statuses': $options[ $key ] = $site->get_launchpad_checklist_tasks_statuses(); break; + case 'migration_source_site_domain': + $options[ $key ] = $site->get_migration_source_site_domain(); + break; case 'wpcom_production_blog_id': $options[ $key ] = $site->get_wpcom_production_blog_id(); break; diff --git a/projects/plugins/jetpack/sal/class.json-api-site-base.php b/projects/plugins/jetpack/sal/class.json-api-site-base.php index 0a0e899cc691b..12d0eb89a7f49 100644 --- a/projects/plugins/jetpack/sal/class.json-api-site-base.php +++ b/projects/plugins/jetpack/sal/class.json-api-site-base.php @@ -1562,6 +1562,15 @@ public function get_launchpad_checklist_tasks_statuses() { return array(); } + /** + * Get site option for migration source site domain + * + * @return string + */ + public function get_migration_source_site_domain() { + return get_option( 'migration_source_site_domain', '' ); + } + /** * Detect whether a site is WordPress.com Staging Site. *