Skip to content

Commit

Permalink
Update/redirect admin interface update (#38107)
Browse files Browse the repository at this point in the history
* Redirect to Default settings page after Admin Interface has been updated to Default

* changelog

* Bump versions

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/9740994307

Upstream-Ref: Automattic/jetpack@7badffb
  • Loading branch information
candy02058912 authored and matticbot committed Jul 1, 2024
1 parent 169572d commit aef9ea5
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 88 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"require": {
"automattic/jetpack-mu-wpcom": "^5.42.0"
"automattic/jetpack-mu-wpcom": "^5.42.1-alpha"
},
"require-dev": {
"yoast/phpunit-polyfills": "1.1.0",
Expand Down
56 changes: 28 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.42.1-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Changed
- Redirect to Default settings page after Admin Interface has been updated to Default.

## [5.42.0] - 2024-06-28
### Fixed
- Disable loading of Custom CSS for atomic sites [#38118]
Expand Down Expand Up @@ -938,6 +945,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Testing initial package release.

[5.42.1-alpha]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.42.0...v5.42.1-alpha
[5.42.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.41.0...v5.42.0
[5.41.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.40.0...v5.41.0
[5.40.0]: https://github.com/Automattic/jetpack-mu-wpcom/compare/v5.39.0...v5.40.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Jetpack_Mu_Wpcom main class.
*/
class Jetpack_Mu_Wpcom {
const PACKAGE_VERSION = '5.42.0';
const PACKAGE_VERSION = '5.42.1-alpha';
const PKG_DIR = __DIR__ . '/../';
const BASE_DIR = __DIR__ . '/';
const BASE_FILE = __FILE__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ function wpcom_admin_interface_display() {
// The option should always be available on atomic sites.
! ( defined( 'IS_WPCOM' ) && IS_WPCOM ) ||
// The option will be shown if the simple site has already changed to Classic which means they should have already passed the experiment gate.
// We can remove the redirection in wpcom_admin_interface_pre_update_option for simple sites after the experiment is finished.
( function_exists( 'wpcom_is_nav_redesign_enabled' ) && wpcom_is_nav_redesign_enabled() ) ) {
add_action( 'admin_init', 'wpcomsh_wpcom_admin_interface_settings_field' );
}
Expand Down Expand Up @@ -87,8 +86,6 @@ function wpcom_admin_interface_pre_update_option( $new_value, $old_value ) {

if ( ( new Automattic\Jetpack\Status\Host() )->is_wpcom_simple() ) {
if ( 'calypso' === $new_value ) {
// Fixes https://github.com/Automattic/dotcom-forge/issues/7760.
// We can remove this code if the related code in wpcom_admin_interface_display is removed.
add_action(
'update_option_wpcom_admin_interface',
/**
Expand All @@ -97,7 +94,7 @@ function wpcom_admin_interface_pre_update_option( $new_value, $old_value ) {
* @return never
*/
function () {
wp_safe_redirect( 'https://wordpress.com/home/' . wpcom_get_site_slug() );
wp_safe_redirect( 'https://wordpress.com/settings/general/' . wpcom_get_site_slug() );
exit;
}
);
Expand Down
Loading

0 comments on commit aef9ea5

Please sign in to comment.