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

removes default value from dont_change_homepage argument #25141

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

andres-blanco
Copy link
Contributor

This PR is a follow up to this other one. We need to remove the default value for the dont_change_homepage argument since the checks that are already in place check for the existence of this argument not the value. Changing this logic would end up being more complex down the road.

For more context see: paYKcK-1Mb-p2#comment-1395

Testing instructions:

  1. Set up a Jurassic Ninja site.
  2. Connect it to WP.com.
  3. Connect to your JN site through ssh.
  4. Add this snippet to the bottom of /srv/users/[USER]/apps/[USER]/public/wp-load.php.
add_action('jetpack_pre_switch_theme', function($arg1, $args ) {
        error_log( var_export( $arg1, true ) );
        error_log( var_export( $args, true ) );
}, 10, 2);
  1. Run tail -F /srv/users/[USER]/apps/[USER]/public/wp-content/debug.log.
  2. Go to the calypso.live link on this PR and select your JN site.
  3. Go to the theme showcase.
  4. Select the twenty twenty theme and press Activate image
  5. Verify this is the output in the log when selecting the preserve option:
[12-Jul-2022 15:01:49 UTC] 'twentytwenty'
[12-Jul-2022 15:01:49 UTC] array (
  'theme' => 'twentytwenty',
  'dont_change_homepage' => true,
)
  1. Verify this is the output in the log when selecting the replace homepage option:
[12-Jul-2022 15:01:49 UTC] 'twentytwenty'
[12-Jul-2022 15:01:49 UTC] array (
  'theme' => 'twentytwenty',
)

Does this pull request change what data or activity we track or use?

No.

Related to Automattic/wp-calypso#56869

@andres-blanco andres-blanco requested a review from a team July 20, 2022 11:11
@andres-blanco andres-blanco self-assigned this Jul 20, 2022
@github-actions github-actions bot added [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Feature] WPCOM API labels Jul 20, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 20, 2022

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: August 2, 2022.
  • Scheduled code freeze: July 25, 2022.

Copy link
Contributor

@nelsonec87 nelsonec87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works!

@andres-blanco andres-blanco added [Status] Needs Review To request a review from Crew. Label will be renamed soon. and removed [Status] Needs Team Review labels Jul 20, 2022
@jeherve jeherve added this to the jetpack/11.2 milestone Jul 20, 2022
@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Jul 20, 2022
@andres-blanco andres-blanco merged commit bd92c18 into trunk Jul 20, 2022
@andres-blanco andres-blanco deleted the fix/default-value-theme-mine branch July 20, 2022 17:25
@github-actions github-actions bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] WPCOM API [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants