Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Migration: New setting for tracking the migration flow #36974

Merged
merged 4 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Add in_site_migration_flow to the list of available site options to update and retrieve. This will be used as part of the Site Migration on-boarding flow.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
),

'request_format' => array(
'in_site_migration_flow' => '(bool) Whether the site is currently in the Site Migration signup flow.',
'blogname' => '(string) Blog name',
'blogdescription' => '(string) Blog description',
'default_pingback_flag' => '(bool) Notify blogs linked from article?',
Expand Down Expand Up @@ -468,6 +469,7 @@ function ( $newsletter_category ) {
'enable_blocks_comments' => (bool) get_option( 'enable_blocks_comments', true ),
'highlander_comment_form_prompt' => $this->get_highlander_comment_form_prompt_option(),
'jetpack_comment_form_color_scheme' => (string) get_option( 'jetpack_comment_form_color_scheme' ),
'in_site_migration_flow' => (bool) get_option( 'in_site_migration_flow', 0 ),
);

if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
Expand Down Expand Up @@ -1135,6 +1137,17 @@ function ( $category_id ) {

break;

case 'in_site_migration_flow':
$canonical_value = (int) (bool) $value;
if ( 0 === $canonical_value ) {
delete_option( 'in_site_migration_flow' );
} else {
update_option( 'in_site_migration_flow', $canonical_value );
}

$updated[ $key ] = $canonical_value;
break;

default:
// allow future versions of this endpoint to support additional settings keys.
if ( has_filter( 'site_settings_endpoint_update_' . $key ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
),

'request_format' => array(
'in_site_migration_flow' => '(bool) Whether the site is currently in the Site Migration signup flow.',
'blogname' => '(string) Blog name',
'blogdescription' => '(string) Blog description',
'default_pingback_flag' => '(bool) Notify blogs linked from article?',
Expand Down
Loading