Skip to content

Commit

Permalink
Stats: Fix stats setting role toggles not sticking (#40853)
Browse files Browse the repository at this point in the history
* fix toggles

* changelog

* includes is not necessary

* make the condition check more robust

* use a const array

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

Upstream-Ref: Automattic/jetpack@be744e8
  • Loading branch information
kangzj authored and matticbot committed Jan 6, 2025
1 parent 2dfcff4 commit bc7ecfb
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 30 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

### This is a list detailing changes for all Jetpack releases.

## 14.3-a.0 - unreleased

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

### Bug fixes
- Fix custom roles settings are not sticking for Jetpack Stats

## 14.2-beta - 2025-01-06
### Bug fixes
- Shortcodes: Prevent conflict with third-party SoundCloud shortcodes. [#40789]
Expand Down
2 changes: 1 addition & 1 deletion _inc/build/admin.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'jquery', 'lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'e1b5b3f94354ffce7dd3');
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'jquery', 'lodash', 'react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'c49dc31043f46fd80c82');
2 changes: 1 addition & 1 deletion _inc/build/admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"platform": {
"ext-intl": "0.0.0"
},
"autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta",
"autoloader-suffix": "f11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0",
"allow-plugins": {
"automattic/jetpack-autoloader": true,
"automattic/jetpack-composer-plugin": true
Expand Down
4 changes: 2 additions & 2 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin URI: https://jetpack.com
* Description: Security, performance, and marketing tools made by WordPress experts. Jetpack keeps your site protected so you can focus on more important things.
* Author: Automattic
* Version: 14.2-beta
* Version: 14.3-a.0
* Author URI: https://jetpack.com
* License: GPL2+
* Text Domain: jetpack
Expand Down Expand Up @@ -34,7 +34,7 @@

define( 'JETPACK__MINIMUM_WP_VERSION', '6.6' );
define( 'JETPACK__MINIMUM_PHP_VERSION', '7.2' );
define( 'JETPACK__VERSION', '14.2-beta' );
define( 'JETPACK__VERSION', '14.3-a.0' );

/**
* Constant used to fetch the connection owner token
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::getLoader();
return ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::getLoader();
2 changes: 1 addition & 1 deletion vendor/autoload_packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta
class ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0
{
private static $loader;

Expand All @@ -24,17 +24,17 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta
class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0
{
public static $files = array (
'3773ef3f09c37da5478d578e32b03a4b' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php',
Expand Down Expand Up @@ -517,9 +517,9 @@ class ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0::$classMap;

}, null, ClassLoader::class);
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-autoloader-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-autoloader-locator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-container.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-hook-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-manifest-reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-path-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-php-autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-plugin-locator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-plugins-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-shutdown-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-version-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down
2 changes: 1 addition & 1 deletion vendor/jetpack-autoloader/class-version-selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_2_beta\al5_0_0;
namespace Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ14_3_a_0\al5_0_0;

// phpcs:ignore

Expand Down

0 comments on commit bc7ecfb

Please sign in to comment.