diff --git a/projects/js-packages/components/changelog/update-header-and-nav-cleanup-and-improvements b/projects/js-packages/components/changelog/update-header-and-nav-cleanup-and-improvements new file mode 100644 index 000000000000..c16dbb28f9f5 --- /dev/null +++ b/projects/js-packages/components/changelog/update-header-and-nav-cleanup-and-improvements @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Part of admin header normalization work + +Remove padding from admin page header subtitle for consistent spacing. diff --git a/projects/js-packages/components/components/admin-page/style.module.scss b/projects/js-packages/components/components/admin-page/style.module.scss index f8145ab7680f..588fa35e4fe3 100644 --- a/projects/js-packages/components/components/admin-page/style.module.scss +++ b/projects/js-packages/components/components/admin-page/style.module.scss @@ -59,4 +59,3 @@ :global(.jetpack-admin-page #dolly) { background-color: #fff; } - diff --git a/projects/packages/admin-ui/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/packages/admin-ui/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..b42bb651e296 --- /dev/null +++ b/projects/packages/admin-ui/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Add "Upgrade Jetpack" menu item for free users in the Jetpack admin menu. diff --git a/projects/packages/admin-ui/composer.json b/projects/packages/admin-ui/composer.json index 9ac4f42b7e56..89057a36fc6c 100644 --- a/projects/packages/admin-ui/composer.json +++ b/projects/packages/admin-ui/composer.json @@ -4,7 +4,9 @@ "type": "jetpack-library", "license": "GPL-2.0-or-later", "require": { - "php": ">=7.2" + "php": ">=7.2", + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev" }, "require-dev": { "yoast/phpunit-polyfills": "^4.0.0", diff --git a/projects/packages/admin-ui/src/class-admin-menu.php b/projects/packages/admin-ui/src/class-admin-menu.php index 32ed2a7c39cb..9261c79367fc 100644 --- a/projects/packages/admin-ui/src/class-admin-menu.php +++ b/projects/packages/admin-ui/src/class-admin-menu.php @@ -15,6 +15,20 @@ class Admin_Menu { const PACKAGE_VERSION = '0.6.0'; + /** + * Redirect source slug used as the upgrade URL identifier and CSS class. + * + * @var string + */ + const UPGRADE_MENU_SLUG = 'jetpack-wpadmin-sidebar-free-plan-upsell-menu-item'; + + /** + * Fallback upgrade URL when the Redirect class is unavailable. + * + * @var string + */ + const UPGRADE_MENU_FALLBACK_URL = 'https://jetpack.com/upgrade/'; + /** * Whether this class has been initialized * @@ -40,6 +54,7 @@ public static function init() { self::handle_akismet_menu(); add_action( 'admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998. add_action( 'network_admin_menu', array( __CLASS__, 'admin_menu_hook_callback' ), 1000 ); // Jetpack uses 998. + add_action( 'admin_head', array( __CLASS__, 'add_upgrade_menu_item_styles' ) ); } } @@ -140,6 +155,8 @@ function ( $a, $b ) { if ( ! $can_see_toplevel_menu ) { remove_menu_page( 'jetpack' ); } + + self::maybe_add_upgrade_menu_item(); } /** @@ -225,4 +242,128 @@ public static function get_top_level_menu_item_url( $fallback = false ) { $url = $fallback ? $fallback : admin_url(); return $url; } + + /** + * Checks whether the current site should show the upgrade menu item. + * + * The upgrade menu is only shown to administrators on free-plan sites + * that are not hosted on WordPress.com. + * + * @return bool True if the upgrade menu should be shown. + */ + private static function should_show_upgrade_menu() { + // Only show to administrators. + if ( ! current_user_can( 'manage_options' ) ) { + return false; + } + + // Don't show upsells on WordPress.com platform. + if ( class_exists( '\Automattic\Jetpack\Status\Host' ) ) { + $host = new \Automattic\Jetpack\Status\Host(); + if ( $host->is_wpcom_platform() ) { + return false; + } + } + + // Only show to free-plan sites. + return self::is_free_plan(); + } + + /** + * Checks whether the current site is on a free Jetpack plan with no active paid license. + * + * @return bool True if the site has no paid plan. + */ + private static function is_free_plan() { + // Check the active plan - use the is_free field or product_slug. + $plan = get_option( 'jetpack_active_plan', array() ); + + // Back-compat: older plan payloads use class to indicate paid plans. + if ( isset( $plan['class'] ) && 'free' !== $plan['class'] ) { + return false; + } + + // If the plan explicitly says it's not free, trust that. + if ( isset( $plan['is_free'] ) && false === $plan['is_free'] ) { + return false; + } + + // Check if the product slug indicates a paid plan. + if ( isset( $plan['product_slug'] ) && 'jetpack_free' !== $plan['product_slug'] ) { + return false; + } + + // Also check for site products (licenses can add products without changing plan). + $products = get_option( 'jetpack_site_products', array() ); + if ( ! empty( $products ) && is_array( $products ) ) { + return false; + } + + return true; + } + + /** + * Conditionally adds an "Upgrade Jetpack" submenu item for free-plan sites. + * + * Only shown to users with manage_options capability on self-hosted sites without a paid Jetpack plan or license. + * + * @return void + */ + private static function maybe_add_upgrade_menu_item() { + if ( ! self::should_show_upgrade_menu() ) { + return; + } + + $upgrade_url = class_exists( '\Automattic\Jetpack\Redirect' ) + ? \Automattic\Jetpack\Redirect::get_url( self::UPGRADE_MENU_SLUG ) + : self::UPGRADE_MENU_FALLBACK_URL; + + $menu_title = esc_html__( 'Upgrade Jetpack', 'jetpack-admin-ui' ) + . ' '; + + add_submenu_page( + 'jetpack', + __( 'Upgrade Jetpack', 'jetpack-admin-ui' ), + $menu_title, + 'manage_options', + esc_url( $upgrade_url ), + null, // @phan-suppress-current-line PhanTypeMismatchArgumentProbablyReal -- Core should ideally document null for no-callback arg. https://core.trac.wordpress.org/ticket/52539. + 999 + ); + + // Add a CSS class to the
  • element so styles can target it precisely. + global $submenu; + if ( ! empty( $submenu['jetpack'] ) ) { + foreach ( $submenu['jetpack'] as $index => $item ) { + if ( isset( $item[2] ) && false !== strpos( $item[2], self::UPGRADE_MENU_SLUG ) ) { + // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited + $submenu['jetpack'][ $index ][4] = ( ! empty( $item[4] ) ? $item[4] . ' ' : '' ) . self::UPGRADE_MENU_SLUG; + break; + } + } + } + } + + /** + * Outputs inline CSS to style the "Upgrade Jetpack" menu item in Jetpack green. + * + * The sidebar menu is visible on every admin page, so styles must load globally. + * Only outputs for free-plan sites on self-hosted installs. + * + * @return void + */ + public static function add_upgrade_menu_item_styles() { + if ( ! self::should_show_upgrade_menu() ) { + return; + } + ?> + + 'upgrade_test_admin', + 'user_pass' => 'pass', + 'user_email' => 'upgrade_admin@example.com', + 'role' => 'administrator', + ) + ); + + $editor_id = wp_insert_user( + array( + 'user_login' => 'upgrade_test_editor', + 'user_pass' => 'pass', + 'user_email' => 'upgrade_editor@example.com', + 'role' => 'editor', + ) + ); + + if ( is_wp_error( $admin_id ) || is_wp_error( $editor_id ) ) { + throw new \Exception( 'Failed to create test users' ); + } + + self::$admin_user_id = $admin_id; + self::$editor_user_id = $editor_id; + } + + /** + * Clean up test users after all tests complete. + * + * @return void + */ + public static function tearDownAfterClass(): void { + parent::tearDownAfterClass(); + + if ( self::$admin_user_id ) { + wp_delete_user( self::$admin_user_id ); + } + if ( self::$editor_user_id ) { + wp_delete_user( self::$editor_user_id ); + } + } + + /** + * Reset shared state before each test. + * + * @return void + */ + public function setUp(): void { + parent::setUp(); + global $submenu; + $submenu = array(); + delete_option( 'jetpack_active_plan' ); + delete_option( 'jetpack_site_products' ); + + $reflection = new \ReflectionClass( Admin_Menu::class ); + + if ( $reflection->hasProperty( 'menu_items' ) ) { + $menu_items = $reflection->getProperty( 'menu_items' ); + // @todo Remove this call once we no longer need to support PHP <8.1. + if ( PHP_VERSION_ID < 80100 ) { + $menu_items->setAccessible( true ); + } + $menu_items->setValue( null, array() ); + } + + if ( $reflection->hasProperty( 'initialized' ) ) { + $initialized = $reflection->getProperty( 'initialized' ); + // @todo Remove this call once we no longer need to support PHP <8.1. + if ( PHP_VERSION_ID < 80100 ) { + $initialized->setAccessible( true ); + } + $initialized->setValue( null, false ); + } + } + /** * Tests whether the page_suffix we return in our method will match the page_suffix returned by the native WP methods * @@ -77,11 +175,13 @@ public static function page_suffix_matches_data() { } /** - * Undocumented function + * Tests that the first registered menu item is returned correctly. * * @return void */ public function test_first_menu() { + wp_set_current_user( self::$admin_user_id ); + Admin_Menu::init(); Admin_Menu::add_menu( 'Test', 'Test', 'edit_posts', 'menu_1', '__return_null', 3 ); Admin_Menu::add_menu( 'Test', 'Test', 'edit_posts', 'menu_2', '__return_null', 1 ); @@ -95,4 +195,288 @@ public function test_first_menu() { $this->assertSame( 'menu_2', $first ); } + + /** + * Upgrade item appears in the submenu for an administrator on a free plan. + * + * @return void + */ + public function test_upgrade_menu_item_shown_for_free_plan_admin() { + wp_set_current_user( self::$admin_user_id ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemPresent(); + } + + /** + * Upgrade item is shown when is_free is explicitly true. + * + * @return void + */ + public function test_upgrade_menu_item_shown_when_is_free_true() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_free', + 'is_free' => true, + ) + ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemPresent(); + } + + /** + * Upgrade item is shown for legacy plan format when class is free. + * + * @return void + */ + public function test_upgrade_menu_item_shown_for_legacy_free_class_plan() { + wp_set_current_user( self::$admin_user_id ); + update_option( 'jetpack_active_plan', array( 'class' => 'free' ) ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemPresent(); + } + + /** + * Upgrade item is absent when the site has a paid plan. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_for_paid_plan() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_security', + 'is_free' => false, + ) + ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * Upgrade item is absent for legacy plan format when class is paid. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_for_legacy_paid_class_plan() { + wp_set_current_user( self::$admin_user_id ); + update_option( 'jetpack_active_plan', array( 'class' => 'security' ) ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * Upgrade item is absent when the plan has is_free field set to false. + * + * Tests the real-world data structure where plan option includes is_free field. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_when_is_free_false() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_complete', + 'is_free' => false, + ) + ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * Upgrade item is absent when product_slug indicates a paid plan. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_for_paid_product_slug() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_security_daily', + ) + ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * Upgrade item is absent when site has products from attached licenses. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_when_site_has_products() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_site_products', + array( + array( + 'product_slug' => 'jetpack_backup_daily', + ), + ) + ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * Upgrade item is absent for users without manage_options capability. + * + * @return void + */ + public function test_upgrade_menu_item_hidden_for_non_admin() { + wp_set_current_user( self::$editor_user_id ); + + Admin_Menu::init(); + do_action( 'admin_menu' ); + + $this->assertUpgradeMenuItemAbsent(); + } + + /** + * CSS styles are output for a free-plan site on any admin screen. + * + * The sidebar is visible everywhere in wp-admin, so styles must load globally. + * + * @return void + */ + public function test_upgrade_menu_item_styles_output_for_free_plan() { + wp_set_current_user( self::$admin_user_id ); + + ob_start(); + Admin_Menu::add_upgrade_menu_item_styles(); + $output = ob_get_clean(); + + $this->assertStringContainsString( Admin_Menu::UPGRADE_MENU_SLUG, $output ); + $this->assertStringContainsString( '#069e08', $output ); + } + + /** + * No CSS output when the site has a paid plan. + * + * @return void + */ + public function test_upgrade_menu_item_styles_no_output_for_paid_plan() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_complete', + 'is_free' => false, + ) + ); + + ob_start(); + Admin_Menu::add_upgrade_menu_item_styles(); + $output = ob_get_clean(); + + $this->assertSame( '', $output ); + } + + /** + * No CSS output when is_free is false. + * + * @return void + */ + public function test_upgrade_menu_item_styles_no_output_when_is_free_false() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_active_plan', + array( + 'product_slug' => 'jetpack_complete', + 'is_free' => false, + ) + ); + + ob_start(); + Admin_Menu::add_upgrade_menu_item_styles(); + $output = ob_get_clean(); + + $this->assertSame( '', $output ); + } + + /** + * No CSS output when site has products. + * + * @return void + */ + public function test_upgrade_menu_item_styles_no_output_when_site_has_products() { + wp_set_current_user( self::$admin_user_id ); + update_option( + 'jetpack_site_products', + array( + array( + 'product_slug' => 'jetpack_backup_daily', + ), + ) + ); + + ob_start(); + Admin_Menu::add_upgrade_menu_item_styles(); + $output = ob_get_clean(); + + $this->assertSame( '', $output ); + } + + /** + * Asserts the upgrade submenu item is present under the jetpack top-level menu. + * + * @return void + */ + private function assertUpgradeMenuItemPresent() { + global $submenu; + $slugs = array_column( $submenu['jetpack'] ?? array(), 2 ); + $found = array_filter( + $slugs, + function ( $slug ) { + return false !== strpos( $slug, Admin_Menu::UPGRADE_MENU_SLUG ); + } + ); + $this->assertNotEmpty( $found, 'Expected the upgrade menu item to be registered.' ); + } + + /** + * Asserts the upgrade submenu item is absent from the jetpack top-level menu. + * + * @return void + */ + private function assertUpgradeMenuItemAbsent() { + global $submenu; + $slugs = array_column( $submenu['jetpack'] ?? array(), 2 ); + $found = array_filter( + $slugs, + function ( $slug ) { + return false !== strpos( $slug, Admin_Menu::UPGRADE_MENU_SLUG ); + } + ); + $this->assertEmpty( $found, 'Expected the upgrade menu item to be absent.' ); + } } diff --git a/projects/packages/backup/changelog/simplify-menu-title b/projects/packages/backup/changelog/simplify-menu-title new file mode 100644 index 000000000000..a44a79d67e63 --- /dev/null +++ b/projects/packages/backup/changelog/simplify-menu-title @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Simplify admin menu title from 'VaultPress Backup' to 'Backups'. diff --git a/projects/packages/backup/changelog/update-header-and-nav-cleanup-and-improvements b/projects/packages/backup/changelog/update-header-and-nav-cleanup-and-improvements new file mode 100644 index 000000000000..9670460299a2 --- /dev/null +++ b/projects/packages/backup/changelog/update-header-and-nav-cleanup-and-improvements @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Replace @automattic/jetpack-components Button with @wordpress/components Button in BackupNowButton component. diff --git a/projects/packages/my-jetpack/changelog/update-header-and-nav-cleanup-and-improvements b/projects/packages/my-jetpack/changelog/update-header-and-nav-cleanup-and-improvements new file mode 100644 index 000000000000..d0e608741f9f --- /dev/null +++ b/projects/packages/my-jetpack/changelog/update-header-and-nav-cleanup-and-improvements @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Reorder admin menu items so external links appear last. diff --git a/projects/plugins/automattic-for-agencies-client/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/automattic-for-agencies-client/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/automattic-for-agencies-client/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/automattic-for-agencies-client/composer.lock b/projects/plugins/automattic-for-agencies-client/composer.lock index 3a586b7c54f8..90838e1b8a05 100644 --- a/projects/plugins/automattic-for-agencies-client/composer.lock +++ b/projects/plugins/automattic-for-agencies-client/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/backup/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/backup/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/backup/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/backup/composer.lock b/projects/plugins/backup/composer.lock index e8c33adec3dc..b70618c37c27 100644 --- a/projects/plugins/backup/composer.lock +++ b/projects/plugins/backup/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/beta/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/beta/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/beta/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/beta/composer.lock b/projects/plugins/beta/composer.lock index ae4af27ca3d3..7ac3387f218a 100644 --- a/projects/plugins/beta/composer.lock +++ b/projects/plugins/beta/composer.lock @@ -12,9 +12,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { @@ -135,6 +137,61 @@ "relative": true } }, + { + "name": "automattic/jetpack-constants", + "version": "dev-trunk", + "dist": { + "type": "path", + "url": "../../packages/constants", + "reference": "378a5d122aedfc25d3aa42ab913803c85a8c857b" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "automattic/jetpack-changelogger": "@dev", + "automattic/phpunit-select-config": "@dev", + "brain/monkey": "^2.6.2", + "yoast/phpunit-polyfills": "^4.0.0" + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + }, + "type": "jetpack-library", + "extra": { + "autotagger": true, + "mirror-repo": "Automattic/jetpack-constants", + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-constants/compare/v${old}...v${new}" + }, + "branch-alias": { + "dev-trunk": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "phpunit": [ + "phpunit-select-config phpunit.#.xml.dist --colors=always" + ], + "test-coverage": [ + "php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"" + ], + "test-php": [ + "@composer phpunit" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "description": "A wrapper for defining constants in a more testable way.", + "transport-options": { + "relative": true + } + }, { "name": "automattic/jetpack-logo", "version": "dev-trunk", @@ -189,6 +246,127 @@ "relative": true } }, + { + "name": "automattic/jetpack-redirect", + "version": "dev-trunk", + "dist": { + "type": "path", + "url": "../../packages/redirect", + "reference": "44d6ec93e4d3b3db6287bf82f316a294d7ef868d" + }, + "require": { + "automattic/jetpack-status": "@dev", + "php": ">=7.2" + }, + "require-dev": { + "automattic/jetpack-changelogger": "@dev", + "automattic/phpunit-select-config": "@dev", + "brain/monkey": "^2.6.2", + "yoast/phpunit-polyfills": "^4.0.0" + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + }, + "type": "jetpack-library", + "extra": { + "autotagger": true, + "mirror-repo": "Automattic/jetpack-redirect", + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-redirect/compare/v${old}...v${new}" + }, + "branch-alias": { + "dev-trunk": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "phpunit": [ + "phpunit-select-config phpunit.#.xml.dist --colors=always" + ], + "test-coverage": [ + "php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"" + ], + "test-php": [ + "@composer phpunit" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "description": "Utilities to build URLs to the jetpack.com/redirect/ service", + "transport-options": { + "relative": true + } + }, + { + "name": "automattic/jetpack-status", + "version": "dev-trunk", + "dist": { + "type": "path", + "url": "../../packages/status", + "reference": "8ce7c4c3d0a7c4ec9fce7b3002ba635afd5bc952" + }, + "require": { + "automattic/jetpack-constants": "@dev", + "php": ">=7.2" + }, + "require-dev": { + "automattic/jetpack-changelogger": "@dev", + "automattic/jetpack-connection": "@dev", + "automattic/jetpack-ip": "@dev", + "automattic/jetpack-plans": "@dev", + "automattic/phpunit-select-config": "@dev", + "brain/monkey": "^2.6.2", + "yoast/phpunit-polyfills": "^4.0.0" + }, + "suggest": { + "automattic/jetpack-autoloader": "Allow for better interoperability with other plugins that use this package." + }, + "type": "jetpack-library", + "extra": { + "autotagger": true, + "mirror-repo": "Automattic/jetpack-status", + "changelogger": { + "link-template": "https://github.com/Automattic/jetpack-status/compare/v${old}...v${new}" + }, + "branch-alias": { + "dev-trunk": "6.1.x-dev" + }, + "dependencies": { + "test-only": [ + "packages/connection", + "packages/plans" + ] + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "scripts": { + "phpunit": [ + "phpunit-select-config phpunit.#.xml.dist --colors=always" + ], + "test-coverage": [ + "php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\"" + ], + "test-php": [ + "@composer phpunit" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "description": "Used to retrieve information about the current status of Jetpack and the site overall.", + "transport-options": { + "relative": true + } + }, { "name": "composer/semver", "version": "3.4.3", diff --git a/projects/plugins/boost/changelog/update-header-and-nav-cleanup-and-improvements b/projects/plugins/boost/changelog/update-header-and-nav-cleanup-and-improvements new file mode 100644 index 000000000000..042f59eaa73d --- /dev/null +++ b/projects/plugins/boost/changelog/update-header-and-nav-cleanup-and-improvements @@ -0,0 +1,5 @@ +Significance: patch +Type: changed +Comment: Add dlocc contributor to readme, remove header padding + + diff --git a/projects/plugins/boost/composer.lock b/projects/plugins/boost/composer.lock index 7ffcc67e72df..5348cdcdd5e7 100644 --- a/projects/plugins/boost/composer.lock +++ b/projects/plugins/boost/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/classic-theme-helper-plugin/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/classic-theme-helper-plugin/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/classic-theme-helper-plugin/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/classic-theme-helper-plugin/composer.lock b/projects/plugins/classic-theme-helper-plugin/composer.lock index 8422660ca786..c5ba21934a8b 100644 --- a/projects/plugins/classic-theme-helper-plugin/composer.lock +++ b/projects/plugins/classic-theme-helper-plugin/composer.lock @@ -130,9 +130,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/inspect/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/inspect/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/inspect/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/inspect/composer.lock b/projects/plugins/inspect/composer.lock index f5c8aae66ef5..1b84548d8fda 100644 --- a/projects/plugins/inspect/composer.lock +++ b/projects/plugins/inspect/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/jetpack/changelog/update-header-and-nav-cleanup-and-improvements b/projects/plugins/jetpack/changelog/update-header-and-nav-cleanup-and-improvements new file mode 100644 index 000000000000..7c654690b9dc --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-header-and-nav-cleanup-and-improvements @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Admin Menu: Reorder menu items so that links opening in new windows appear last. diff --git a/projects/plugins/jetpack/composer.lock b/projects/plugins/jetpack/composer.lock index 0f150ca434bf..fc65a881c99d 100644 --- a/projects/plugins/jetpack/composer.lock +++ b/projects/plugins/jetpack/composer.lock @@ -199,9 +199,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/mu-wpcom-plugin/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/mu-wpcom-plugin/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/mu-wpcom-plugin/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/mu-wpcom-plugin/composer.lock b/projects/plugins/mu-wpcom-plugin/composer.lock index b612e27c683e..9325eccc007b 100644 --- a/projects/plugins/mu-wpcom-plugin/composer.lock +++ b/projects/plugins/mu-wpcom-plugin/composer.lock @@ -130,9 +130,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/paypal-payment-buttons/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/paypal-payment-buttons/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/paypal-payment-buttons/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/paypal-payment-buttons/composer.lock b/projects/plugins/paypal-payment-buttons/composer.lock index 2d360c6b4a50..db770a0656dc 100644 --- a/projects/plugins/paypal-payment-buttons/composer.lock +++ b/projects/plugins/paypal-payment-buttons/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/protect/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/protect/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/protect/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/protect/composer.lock b/projects/plugins/protect/composer.lock index 104a427dcb44..bdfd511ebb1d 100644 --- a/projects/plugins/protect/composer.lock +++ b/projects/plugins/protect/composer.lock @@ -135,9 +135,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/search/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/search/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/search/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/search/composer.lock b/projects/plugins/search/composer.lock index 03dfc8b9eaf1..9c4dd6e99b80 100644 --- a/projects/plugins/search/composer.lock +++ b/projects/plugins/search/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/social/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/social/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/social/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/social/composer.lock b/projects/plugins/social/composer.lock index 4c686b4d8ac0..6528cb6b9b97 100644 --- a/projects/plugins/social/composer.lock +++ b/projects/plugins/social/composer.lock @@ -130,9 +130,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/starter-plugin/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/starter-plugin/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/starter-plugin/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/starter-plugin/composer.lock b/projects/plugins/starter-plugin/composer.lock index 577b09df6500..9c0e6b5bab6a 100644 --- a/projects/plugins/starter-plugin/composer.lock +++ b/projects/plugins/starter-plugin/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/videopress/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/videopress/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/videopress/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/videopress/composer.lock b/projects/plugins/videopress/composer.lock index af52506f6ad2..36f10c391027 100644 --- a/projects/plugins/videopress/composer.lock +++ b/projects/plugins/videopress/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/wpcloud-sso/changelog/pr-47418 b/projects/plugins/wpcloud-sso/changelog/pr-47418 new file mode 100644 index 000000000000..07a9969e052c --- /dev/null +++ b/projects/plugins/wpcloud-sso/changelog/pr-47418 @@ -0,0 +1,4 @@ +Significance: patch +Type: changed +Comment: composer.lock update for internal admin-ui dependency changes; no user-facing impact + diff --git a/projects/plugins/wpcloud-sso/composer.lock b/projects/plugins/wpcloud-sso/composer.lock index 3cbc72ab4d91..46ae84b11c3f 100644 --- a/projects/plugins/wpcloud-sso/composer.lock +++ b/projects/plugins/wpcloud-sso/composer.lock @@ -66,9 +66,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": { diff --git a/projects/plugins/wpcomsh/changelog/feature-upsell-to-pro-wp-admin-menu b/projects/plugins/wpcomsh/changelog/feature-upsell-to-pro-wp-admin-menu new file mode 100644 index 000000000000..c95ae24d87d1 --- /dev/null +++ b/projects/plugins/wpcomsh/changelog/feature-upsell-to-pro-wp-admin-menu @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Dependencies: Update lock file to keep root requirements in sync. diff --git a/projects/plugins/wpcomsh/composer.lock b/projects/plugins/wpcomsh/composer.lock index f9158080a6ad..9ba34a090da3 100644 --- a/projects/plugins/wpcomsh/composer.lock +++ b/projects/plugins/wpcomsh/composer.lock @@ -198,9 +198,11 @@ "dist": { "type": "path", "url": "../../packages/admin-ui", - "reference": "35c5547f0d22d865152761ac473e666767b59d70" + "reference": "827d689e815ae1112f6823ed45a51739d78bac4f" }, "require": { + "automattic/jetpack-redirect": "@dev", + "automattic/jetpack-status": "@dev", "php": ">=7.2" }, "require-dev": {