Skip to content

Commit

Permalink
Update to 3.6.0 beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
donnchawp authored and matticbot committed Nov 20, 2024
1 parent 58bd5c8 commit f2d5d00
Show file tree
Hide file tree
Showing 34 changed files with 241 additions and 222 deletions.
10 changes: 6 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,24 @@ 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).

## [3.6.0-beta] - 2024-11-04
## [3.6.0-beta2] - 2024-11-20
### Added
- Cornerstone Pages: Added feature to allow selecting important pages. [#39863]
- Cornerstone Pages: Added setting to allow selecting important pages. [#39863]

### Changed
- Critical CSS: Improve logic that generates URLs for critical CSS generation. [#39862]
- Page Speed: Update speed scores to be based on first cornerstone page. [#39863]
- General: Improve compatibility with WordPress 6.7. [#39877] [#39786]
- General: Update badges used to show state of features. [#40031]
- Page Speed: Update speed scores to be based on first cornerstone page. [#39863]

### Removed
- Image Guide: Remove URL parameter based override. [#39874]

### Fixed
- Image Size Analysis: Fix UI not properly reflecting current state after interaction.
- Page Speed: Fix typo in Overall Score tooltip. [#39974]
- Performance History: Fixed tooltip behavior. [#39879]
- UI: Fix Boost's menu counter sometimes displaying incorrectly.

## [3.5.2] - 2024-10-15
### Changed
Expand Down Expand Up @@ -541,7 +543,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- First public alpha release

[3.6.0-beta]: https://github.com/Automattic/jetpack-boost-production/compare/3.5.2...3.6.0-beta
[3.6.0-beta2]: https://github.com/Automattic/jetpack-boost-production/compare/3.5.2...3.6.0-beta
[3.5.2]: https://github.com/Automattic/jetpack-boost-production/compare/3.5.1...3.5.2
[3.5.1]: https://github.com/Automattic/jetpack-boost-production/compare/3.5.0...3.5.1
[3.5.0]: https://github.com/Automattic/jetpack-boost-production/compare/3.4.9...3.5.0
Expand Down
2 changes: 1 addition & 1 deletion app/admin/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function handle_admin_menu() {
$total_problems = apply_filters( 'jetpack_boost_total_problem_count', 0 );
$menu_label = _x( 'Boost', 'The Jetpack Boost product name, without the Jetpack prefix', 'jetpack-boost' );
if ( $total_problems ) {
$menu_label .= sprintf( ' <span class="update-plugins">%d</span>', $total_problems );
$menu_label .= sprintf( ' <span class="menu-counter count-%d"><span class="count">%d</span></span>', $total_problems, $total_problems );
}

$page_suffix = Admin_Menu::add_menu(
Expand Down
2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-boost.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '70024e880b49cd37a829');
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-date', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '073878fac3c3a17926a9');
2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-boost.css

Large diffs are not rendered by default.

66 changes: 34 additions & 32 deletions app/assets/dist/jetpack-boost.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/assets/dist/jetpack-boost.rtl.css

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions app/data-sync/Cornerstone_Pages_Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ public function get( $fallback_value = array() ) {
public function set( $value ) {
$value = $this->sanitize_value( $value );

if ( empty( $value ) || count( $value ) === 1 && $value[0] === '' ) {
delete_option( $this->option_key );
return;
}

$value = array_map( 'untrailingslashit', $value );

$updated = update_option( $this->option_key, $value );
if ( $updated ) {
( new Environment_Change_Detector() )->handle_cornerstone_pages_list_update();
Expand All @@ -43,7 +36,7 @@ public function set( $value ) {

private function sanitize_value( $value ) {
if ( is_array( $value ) ) {
$value = array_values( array_unique( array_map( array( $this, 'transform_to_relative' ), $value ) ) );
$value = array_values( array_unique( array_map( 'untrailingslashit', array_map( array( $this, 'transform_to_relative' ), $value ) ) ) );
} else {
$value = array();
}
Expand Down
17 changes: 14 additions & 3 deletions app/lib/Cornerstone_Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,22 @@ class Cornerstone_Pages implements Has_Setup {
const FREE_MAX_PAGES = 1;

public function setup() {
$this->register_ds_stores();

add_filter( 'jetpack_boost_critical_css_providers', array( $this, 'remove_ccss_front_page_provider' ), 10, 2 );
add_filter( 'display_post_states', array( $this, 'add_display_post_states' ), 10, 2 );
add_action( 'init', array( $this, 'register_ds_stores' ) );
add_action( 'init', array( $this, 'set_default_pages' ), 0 );
}

public function set_default_pages() {
$pages = jetpack_boost_ds_get( 'cornerstone_pages_list' );
if ( empty( $pages ) ) {
jetpack_boost_ds_set( 'cornerstone_pages_list', $this->default_pages() );
}
}

public function register_ds_stores() {
$schema = Schema::as_array( Schema::as_string() )->fallback( $this->default_pages() );
private function register_ds_stores() {
$schema = Schema::as_array( Schema::as_string() )->fallback( array() );
jetpack_boost_register_option( 'cornerstone_pages_list', $schema, new Cornerstone_Pages_Entry( 'cornerstone_pages_list' ) );
jetpack_boost_register_readonly_option( 'cornerstone_pages_properties', array( $this, 'get_properties' ) );
}
Expand Down Expand Up @@ -47,6 +56,7 @@ private function default_pages() {
$homepage = array( '' );

$urls = array_unique( array_merge( $homepage, $woocommerce_pages, $yoast_cornerstone_pages ) );
$urls = array_map( 'untrailingslashit', $urls );

return array_slice( $urls, 0, $max_pages );
}
Expand Down Expand Up @@ -120,6 +130,7 @@ public function get_properties() {
return array(
'max_pages' => $this->get_max_pages(),
'max_pages_premium' => static::PREMIUM_MAX_PAGES,
'default_pages' => array_map( 'home_url', $this->default_pages() ),
);
}

Expand Down
14 changes: 6 additions & 8 deletions app/lib/class-site-urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ private static function get_wp_core_urls() {
'modified' => get_post_modified_time( 'Y-m-d H:i:s', false, $front_page ),
'group' => 'core_front_page',
);
} else {
$urls['core_front_page'] = array(
'url' => home_url( '/' ),
'modified' => current_time( 'Y-m-d H:i:s' ),
'group' => 'core_front_page',
);
}

$posts_page = get_option( 'page_for_posts' );
Expand All @@ -45,14 +51,6 @@ private static function get_wp_core_urls() {
);
}

if ( empty( $front_page ) && empty( $posts_page ) ) {
$urls['core_posts_page'] = array(
'url' => home_url( '/' ),
'modified' => current_time( 'Y-m-d H:i:s' ),
'group' => 'core_front_page',
);
}

return $urls;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,33 @@
class Image_Size_Analysis_Summary implements Lazy_Entry, Entry_Can_Get {

public function get( $_fallback = false ) {
$fixes = Image_Size_Analysis_Fixer::get_all_fixes();
$report_id = defined( 'JETPACK_BOOST_FORCE_REPORT_ID' ) ? JETPACK_BOOST_FORCE_REPORT_ID : 'latest';
$report = Boost_API::get( 'image-guide/reports/' . $report_id );

if ( is_wp_error( $report ) ) {
// If no report is found, return it as a status.
if ( $report->get_error_code() === 'report-not-found' ) {
throw new \RuntimeException( 'Report not found' );
return array(
'status' => 'not-found',
'message' => __( 'Report not found.', 'jetpack-boost' ),
);
}

// Other kinds of errors are a problem.
return array(
'status' => 'error',
'error' => $report->get_error_message(),
'status' => 'error',
'message' => $report->get_error_message(),
);
}

if ( isset( $report['status'] ) && $report['status'] === 'completed' && empty( $report['groups'] ) ) {
return array(
'status' => 'error',
'message' => __( 'Report is incomplete. Missing groups.', 'jetpack-boost' ),
);
}

$fixes = Image_Size_Analysis_Fixer::get_all_fixes();
if ( ! empty( $fixes ) ) {
// $fixes is an array of post_ids. which is an array of image fixes. count the number of image fixes.
$fixed_count = 0;
Expand Down
1 change: 1 addition & 0 deletions app/modules/image-size-analysis/data-sync/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
'error_stuck',
)
),
'message' => Schema::as_string()->nullable(),
'report_id' => Schema::as_number()->nullable(),
'groups' => Schema::as_assoc_array(
array(
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Boost your WordPress site's performance, from the creators of Jetpack",
"type": "library",
"license": "GPL-2.0-or-later",
"version": "3.6.0-beta",
"version": "3.6.0-beta2",
"authors": [
{
"name": "Automattic, Inc.",
Expand Down Expand Up @@ -81,7 +81,7 @@
"platform": {
"ext-intl": "0.0.0"
},
"autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta",
"autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta2",
"allow-plugins": {
"roots/wordpress-core-installer": true,
"automattic/jetpack-autoloader": true,
Expand Down
4 changes: 2 additions & 2 deletions jetpack-boost.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Jetpack Boost
* Plugin URI: https://jetpack.com/boost
* Description: Boost your WordPress site's performance, from the creators of Jetpack
* Version: 3.6.0-beta
* Version: 3.6.0-beta2
* Author: Automattic - Jetpack Site Speed team
* Author URI: https://jetpack.com/boost/
* License: GPL-2.0+
Expand All @@ -29,7 +29,7 @@
die;
}

define( 'JETPACK_BOOST_VERSION', '3.6.0-beta' );
define( 'JETPACK_BOOST_VERSION', '3.6.0-beta2' );
define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' );

if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) {
Expand Down
8 changes: 5 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,24 @@ If you run into compatibility issues, please do let us know. You can drop us a l
2. Jetpack Boost Speed Improvement

== Changelog ==
### 3.6.0-beta - 2024-11-04
### 3.6.0-beta2 - 2024-11-20
#### Added
- Cornerstone Pages: Added feature to allow selecting important pages.
- Cornerstone Pages: Added setting to allow selecting important pages.

#### Changed
- Critical CSS: Improve logic that generates URLs for critical CSS generation.
- Page Speed: Update speed scores to be based on first cornerstone page.
- General: Improve compatibility with WordPress 6.7.
- General: Update badges used to show state of features.
- Page Speed: Update speed scores to be based on first cornerstone page.

#### Removed
- Image Guide: Remove URL parameter based override.

#### Fixed
- Image Size Analysis: Fix UI not properly reflecting current state after interaction.
- Page Speed: Fix typo in Overall Score tooltip.
- Performance History: Fixed tooltip behavior.
- UI: Fix Boost's menu counter sometimes displaying incorrectly.

--------

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 ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::getLoader();
return ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::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\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta\al3_1_3;
namespace Automattic\Jetpack\Autoloader\jpb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta2\al3_1_3;

// 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 ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta
class ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2
{
private static $loader;

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

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta2', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_beta2', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::getInitializer($loader));

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

$filesToLoad = \Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::$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 ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta
class ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2
{
public static $files = array (
'3773ef3f09c37da5478d578e32b03a4b' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php',
Expand Down Expand Up @@ -423,9 +423,9 @@ class ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_6_0_b
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb1e77e6231d50e7663f84529b6a3dfda_jetpack_boost3_6_0_beta2::$classMap;

}, null, ClassLoader::class);
}
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'automattic/jetpack-boost',
'pretty_version' => '3.6.0-beta',
'version' => '3.6.0.0-beta',
'pretty_version' => '3.6.0-beta2',
'version' => '3.6.0.0-beta2',
'reference' => null,
'type' => 'library',
'install_path' => __DIR__ . '/../../',
Expand Down Expand Up @@ -47,8 +47,8 @@
'dev_requirement' => false,
),
'automattic/jetpack-boost' => array(
'pretty_version' => '3.6.0-beta',
'version' => '3.6.0.0-beta',
'pretty_version' => '3.6.0-beta2',
'version' => '3.6.0.0-beta2',
'reference' => null,
'type' => 'library',
'install_path' => __DIR__ . '/../../',
Expand Down
Loading

0 comments on commit f2d5d00

Please sign in to comment.