From b8ec2c0b04cb971b54ad758781b3588d177f8518 Mon Sep 17 00:00:00 2001 From: candy02058912 Date: Mon, 1 Apr 2024 09:19:34 +0000 Subject: [PATCH] Load Odyssey Stats for simple sites (#36628) * Load Odyssey Stats for simple sites * Changelog * Fix file name to wpcom-simple-odyssey-stats.php * Make Phan happy * Run tools/fixup-project-versions.sh to make linter happy * Add wpcom_is_nav_redesign_enabled check --------- Co-authored-by: DustyReagan Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/8506186690 --- composer.lock | 14 +++++++------- .../automattic/jetpack-mu-wpcom/CHANGELOG.md | 1 + .../src/class-jetpack-mu-wpcom.php | 10 ++++++++++ .../wpcom-simple-odyssey-stats.php | 18 ++++++++++++++++++ vendor/composer/installed.json | 12 ++++++------ vendor/composer/installed.php | 12 ++++++------ 6 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php diff --git a/composer.lock b/composer.lock index b87657fe..576b3d6e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c93f032cffcd588a951000d236412959", + "content-hash": "d4ce3bc1ad21996d5abcc90d6567b52f", "packages": [ { "name": "automattic/jetpack-assets", @@ -12,7 +12,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-assets", - "reference": "f30fd8d336c59c6f63ee657e042070fd61687891" + "reference": "2c806a88478d4cb9b237ec50ab95d114a9e13293" }, "require": { "automattic/jetpack-constants": "^2.0.1", @@ -78,7 +78,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-constants", - "reference": "d9c974b6bc710a3aebd0eb5acda8d539f301be3b" + "reference": "d552628993f2173309253bff3ee5f3bf588674a8" }, "require": { "php": ">=7.0" @@ -125,11 +125,11 @@ }, { "name": "automattic/jetpack-mu-wpcom", - "version": "5.22.0-alpha.1711728682", + "version": "5.22.0-alpha.1711962375", "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom", - "reference": "8bc8fec935547e50b7a964ba0c1b1d4ff55fa6f9" + "reference": "0fea8a20cde34ca0159c411935aab909b628c432" }, "require": { "automattic/jetpack-assets": "^2.1.6", @@ -198,7 +198,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/scheduled-updates", - "reference": "c19a7cf28c958ec863a31fb07a659f3d3cf9e25d" + "reference": "ee751b49cad9a03b83c5e9c7efc432ef0c341bec" }, "require": { "php": ">=7.0" @@ -263,7 +263,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-changelogger", - "reference": "3ac1e1143f66c0ca5e30c7a6011d88703299e693" + "reference": "58bb1c2cf8260a1a9d5f813c8f75c3183d129d2b" }, "require": { "php": ">=7.0", diff --git a/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md b/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md index a2017271..1c9546c1 100644 --- a/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md +++ b/vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This is an alpha version! The changes listed here are not final. ### Added +- Add Odyssey Stats to wpcom Simple Site - Change Phan baselines. ### Changed diff --git a/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php b/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php index 7e93ba44..4df3757a 100644 --- a/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php +++ b/vendor/automattic/jetpack-mu-wpcom/src/class-jetpack-mu-wpcom.php @@ -46,6 +46,7 @@ public static function init() { if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { add_action( 'plugins_loaded', array( __CLASS__, 'load_verbum_comments' ) ); add_action( 'wp_loaded', array( __CLASS__, 'load_verbum_comments_admin' ) ); + add_action( 'plugins_loaded', array( __CLASS__, 'load_wpcom_simple_odyssey_stats' ) ); } // Unified navigation fix for changes in WordPress 6.2. @@ -278,4 +279,13 @@ public static function load_verbum_comments_admin() { public static function load_wpcom_command_palette() { require_once __DIR__ . '/features/wpcom-command-palette/wpcom-command-palette.php'; } + + /** + * Load Odyssey Stats in Simple sites. + */ + public static function load_wpcom_simple_odyssey_stats() { + if ( function_exists( 'wpcom_is_nav_redesign_enabled' ) && wpcom_is_nav_redesign_enabled() ) { + require_once __DIR__ . '/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php'; + } + } } diff --git a/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php b/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php new file mode 100644 index 00000000..39592e3f --- /dev/null +++ b/vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-simple-odyssey-stats/wpcom-simple-odyssey-stats.php @@ -0,0 +1,18 @@ +=7.0" @@ -125,12 +125,12 @@ }, { "name": "automattic/jetpack-mu-wpcom", - "version": "5.22.0-alpha.1711728682", - "version_normalized": "5.22.0.0-alpha1711728682", + "version": "5.22.0-alpha.1711962375", + "version_normalized": "5.22.0.0-alpha1711962375", "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom", - "reference": "8bc8fec935547e50b7a964ba0c1b1d4ff55fa6f9" + "reference": "0fea8a20cde34ca0159c411935aab909b628c432" }, "require": { "automattic/jetpack-assets": "^2.1.6", @@ -202,7 +202,7 @@ "dist": { "type": "path", "url": "/tmp/jetpack-build/Automattic/scheduled-updates", - "reference": "c19a7cf28c958ec863a31fb07a659f3d3cf9e25d" + "reference": "ee751b49cad9a03b83c5e9c7efc432ef0c341bec" }, "require": { "php": ">=7.0" diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index acd781a6..91da24b8 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -13,7 +13,7 @@ 'automattic/jetpack-assets' => array( 'pretty_version' => '2.1.6', 'version' => '2.1.6.0', - 'reference' => 'f30fd8d336c59c6f63ee657e042070fd61687891', + 'reference' => '2c806a88478d4cb9b237ec50ab95d114a9e13293', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-assets', 'aliases' => array(), @@ -22,16 +22,16 @@ 'automattic/jetpack-constants' => array( 'pretty_version' => '2.0.1', 'version' => '2.0.1.0', - 'reference' => 'd9c974b6bc710a3aebd0eb5acda8d539f301be3b', + 'reference' => 'd552628993f2173309253bff3ee5f3bf588674a8', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-constants', 'aliases' => array(), 'dev_requirement' => false, ), 'automattic/jetpack-mu-wpcom' => array( - 'pretty_version' => '5.22.0-alpha.1711728682', - 'version' => '5.22.0.0-alpha1711728682', - 'reference' => '8bc8fec935547e50b7a964ba0c1b1d4ff55fa6f9', + 'pretty_version' => '5.22.0-alpha.1711962375', + 'version' => '5.22.0.0-alpha1711962375', + 'reference' => '0fea8a20cde34ca0159c411935aab909b628c432', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/jetpack-mu-wpcom', 'aliases' => array(), @@ -49,7 +49,7 @@ 'automattic/scheduled-updates' => array( 'pretty_version' => '0.5.3-alpha.1711633255', 'version' => '0.5.3.0-alpha1711633255', - 'reference' => 'c19a7cf28c958ec863a31fb07a659f3d3cf9e25d', + 'reference' => 'ee751b49cad9a03b83c5e9c7efc432ef0c341bec', 'type' => 'jetpack-library', 'install_path' => __DIR__ . '/../automattic/scheduled-updates', 'aliases' => array(),