Skip to content

Commit

Permalink
Wordpress core and plugin upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
michaliskambi committed Sep 26, 2024
1 parent 1580fcf commit 438a7d1
Show file tree
Hide file tree
Showing 366 changed files with 6,040 additions and 3,203 deletions.
6 changes: 2 additions & 4 deletions htdocs/wp/wp-content/plugins/jetpack-boost/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ module.exports = {
root: true,
extends: [
require.resolve( 'jetpack-js-tools/eslintrc/base' ),
// @todo: Uncomment this:
// require.resolve( 'jetpack-js-tools/eslintrc/react' ),
require.resolve( 'jetpack-js-tools/eslintrc/wp-eslint-plugin/recommended' ),
],
ignorePatterns: [ '**/stories/*.stories.tsx', ...loadIgnorePatterns( __dirname ) ],
parserOptions: {
babelOptions: {
configFile: require.resolve( './babel.config.js' ),
},
sourceType: 'module',
tsconfigRootDir: __dirname,
project: [ './tsconfig.json', './tsconfig.eslint.json' ],
},
Expand Down
13 changes: 13 additions & 0 deletions htdocs/wp/wp-content/plugins/jetpack-boost/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ 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.5.0] - 2024-09-25
### Changed
- General: Show a simplified getting started page if the pricing is not available [#39526]
- General: Skip the pricing page if the site is private, just like if offline [#39523]

### Removed
- General: Removed WP Super Cache promos from settings page as well as related code [#39202]

### Fixed
- Compatibility: Ensure React JSX polyfill is loaded for pre WP 6.6 support [#39521]
- Critical CSS: Make sure all URLs that are being processed are absolute instead of relative. [#39456]

## [3.4.9] - 2024-09-03
### Fixed
- Update `automattic/jetpack-image-cdn` package to resolve a PHP fatal error.
Expand Down Expand Up @@ -498,6 +510,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- First public alpha release

[3.5.0]: https://github.com/Automattic/jetpack-boost-production/compare/3.4.9...3.5.0
[3.4.9]: https://github.com/Automattic/jetpack-boost-production/compare/3.4.8...3.4.9
[3.4.8]: https://github.com/Automattic/jetpack-boost-production/compare/3.4.7...3.4.8
[3.4.7]: https://github.com/Automattic/jetpack-boost-production/compare/3.4.6...3.4.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Automattic\Jetpack_Boost\Admin;

use Automattic\Jetpack\Admin_UI\Admin_Menu;
use Automattic\Jetpack\Assets;
use Automattic\Jetpack\Boost_Speed_Score\Speed_Score;
use Automattic\Jetpack_Boost\Lib\Analytics;
use Automattic\Jetpack_Boost\Lib\Environment_Change_Detector;
Expand Down Expand Up @@ -66,33 +67,9 @@ public function admin_init() {
// Clear premium features cache when the plugin settings page is loaded.
Premium_Features::clear_cache();

add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
}

/**
* Register the stylesheets for the admin area.
*
* @since 1.0.0
*/
public function enqueue_styles() {
/**
* Filters the internal path to the distributed assets used by the plugin
*
* @param string $path the path to the assets
*
* @since 1.0.0
*/
$internal_path = apply_filters( 'jetpack_boost_asset_internal_path', 'app/assets/dist/' );

wp_enqueue_style(
'jetpack-boost-css',
plugins_url( $internal_path . 'jetpack-boost.css', JETPACK_BOOST_PATH ),
array( 'wp-components' ),
JETPACK_BOOST_VERSION
);
}

/**
* Register the JavaScript for the admin area.
*
Expand All @@ -108,12 +85,13 @@ public function enqueue_scripts() {

$critical_css_gen_handle = 'jetpack-boost-critical-css-gen';

wp_register_script(
Assets::register_script(
$critical_css_gen_handle,
plugins_url( $internal_path . 'critical-css-gen.js', JETPACK_BOOST_PATH ),
array(),
JETPACK_BOOST_VERSION,
true
$internal_path . 'critical-css-gen.js',
JETPACK_BOOST_PATH,
array(
'in_footer' => true,
)
);

$admin_js_handle = 'jetpack-boost-admin';
Expand All @@ -128,12 +106,16 @@ public function enqueue_scripts() {
$admin_js_dependencies[] = $critical_css_gen_handle;
}

wp_register_script(
Assets::register_script(
$admin_js_handle,
plugins_url( $internal_path . 'jetpack-boost.js', JETPACK_BOOST_PATH ),
$admin_js_dependencies,
JETPACK_BOOST_VERSION,
true
$internal_path . 'jetpack-boost.js',
JETPACK_BOOST_PATH,
array(
'dependencies' => $admin_js_dependencies,
'in_footer' => true,
'textdomain' => 'jetpack-boost',
'css_path' => $internal_path . 'jetpack-boost.css',
)
);

wp_localize_script(
Expand All @@ -142,9 +124,7 @@ public function enqueue_scripts() {
( new Config() )->constants()
);

wp_set_script_translations( $admin_js_handle, 'jetpack-boost' );

wp_enqueue_script( $admin_js_handle );
Assets::enqueue_script( $admin_js_handle );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function constants() {
'site' => array(
'url' => get_home_url(),
'domain' => ( new Status() )->get_site_suffix(),
'online' => ! ( new Status() )->is_offline_mode(),
'online' => ! ( new Status() )->is_offline_mode() && ! ( new Status() )->is_private_site(),
'host' => ( new Host() )->get_known_host_guess(),
),
'api' => array(
Expand Down
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' => '7c43846be6dfaecfbe44');
<?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' => '4686e652b7c46b0e812c');

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public function get( $fallback = false ) {
return false;
}

// No need to show the page if the site is private.
if ( ( new Status() )->is_private_site() ) {
return false;
}

// If there is no connection, the page must be shown to give them a chance to connect by choosing a plan.
if ( ! ( new Connection() )->is_connected() ) {
return true;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public function get_provider_sources() {
continue;
}

$urls = $this->make_absolute_urls( $urls );

$key = $provider_name . '_' . $group;

// For each URL
Expand All @@ -164,4 +166,29 @@ public function get_provider_sources() {

return $sources;
}

/**
* Make URLs absolute.
*
* @param array $urls The list of URLs to make absolute.
*
* @return array
*/
private function make_absolute_urls( $urls ) {
$absolute_urls = array();
foreach ( $urls as $url ) {
if ( class_exists( '\WP_Http' ) && method_exists( '\WP_Http', 'make_absolute_url' ) ) {
$absolute_urls[] = \WP_Http::make_absolute_url( $url, home_url() );
continue;
}

if ( stripos( $url, home_url() ) === 0 ) {
$absolute_urls[] = $url;
} else {
$absolute_urls[] = home_url( $url );
}
}

return $absolute_urls;
}
}
24 changes: 12 additions & 12 deletions htdocs/wp/wp-content/plugins/jetpack-boost/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.4.9",
"version": "3.5.0",
"authors": [
{
"name": "Automattic, Inc.",
Expand All @@ -14,21 +14,21 @@
"prefer-stable": true,
"require": {
"ext-json": "*",
"automattic/jetpack-admin-ui": "^0.4.4",
"automattic/jetpack-assets": "^2.3.5",
"automattic/jetpack-autoloader": "^3.0.10",
"automattic/jetpack-boost-core": "^0.2.9",
"automattic/jetpack-admin-ui": "^0.4.5",
"automattic/jetpack-assets": "^2.3.8",
"automattic/jetpack-autoloader": "^3.1.0",
"automattic/jetpack-boost-core": "^0.2.12",
"automattic/jetpack-boost-speed-score": "^0.3.12",
"automattic/jetpack-composer-plugin": "^2.0.3",
"automattic/jetpack-config": "^2.0.4",
"automattic/jetpack-connection": "^2.12.5",
"automattic/jetpack-device-detection": "^2.1.4",
"automattic/jetpack-image-cdn": "^0.4.8",
"automattic/jetpack-my-jetpack": "^4.33.1",
"automattic/jetpack-connection": "^5.1.0",
"automattic/jetpack-device-detection": "^2.1.5",
"automattic/jetpack-image-cdn": "^0.4.9",
"automattic/jetpack-my-jetpack": "^4.35.8",
"automattic/jetpack-plugin-deactivation": "^0.2.2",
"automattic/jetpack-schema": "^0.1.1",
"automattic/jetpack-status": "^3.3.4",
"automattic/jetpack-sync": "^3.8.1",
"automattic/jetpack-status": "^4.0.2",
"automattic/jetpack-sync": "^3.13.1",
"automattic/jetpack-wp-js-data-sync": "^0.5.0",
"matthiasmullie/minify": "^1.3",
"tubalmartin/cssmin": "^4.1"
Expand Down Expand Up @@ -74,7 +74,7 @@
"platform": {
"ext-intl": "0.0.0"
},
"autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_4_9",
"autoloader-suffix": "b1e77e6231d50e7663f84529b6a3dfda_jetpack_boostⓥ3_5_0",
"allow-plugins": {
"roots/wordpress-core-installer": true,
"automattic/jetpack-autoloader": true,
Expand Down
4 changes: 2 additions & 2 deletions htdocs/wp/wp-content/plugins/jetpack-boost/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.4.9
* Version: 3.5.0
* 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.4.9' );
define( 'JETPACK_BOOST_VERSION', '3.5.0' );
define( 'JETPACK_BOOST_SLUG', 'jetpack-boost' );

if ( ! defined( 'JETPACK_BOOST_CLIENT_NAME' ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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).

## [0.4.5] - 2024-09-05
### Changed
- Jetpack menu: only register Jetpack admin page for contributor roles and above. [#39081]

## [0.4.4] - 2024-08-29
### Changed
- Admin menu: change order of Jetpack sub-menu items [#39095]
Expand Down Expand Up @@ -156,6 +160,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixing menu visibility issues.

[0.4.5]: https://github.com/Automattic/jetpack-admin-ui/compare/0.4.4...0.4.5
[0.4.4]: https://github.com/Automattic/jetpack-admin-ui/compare/0.4.3...0.4.4
[0.4.3]: https://github.com/Automattic/jetpack-admin-ui/compare/0.4.2...0.4.3
[0.4.2]: https://github.com/Automattic/jetpack-admin-ui/compare/0.4.1...0.4.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class Admin_Menu {

const PACKAGE_VERSION = '0.4.4';
const PACKAGE_VERSION = '0.4.5';

/**
* Whether this class has been initialized
Expand Down Expand Up @@ -82,7 +82,7 @@ public static function admin_menu_hook_callback() {
add_menu_page(
'Jetpack',
'Jetpack',
'read',
'edit_posts',
'jetpack',
'__return_null',
$icon,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: [ require.resolve( 'jetpack-js-tools/eslintrc/react' ) ],
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ 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).

## [2.3.8] - 2024-09-10
### Changed
- Updated package dependencies. [#39302]

## [2.3.7] - 2024-09-05
### Changed
- Internal updates.

## [2.3.6] - 2024-09-05
### Changed
- Updated package dependencies. [#39176]

### Fixed
- Fixed script data not available in block editor iframe [#39221]

## [2.3.5] - 2024-08-29
### Changed
- Updated package dependencies. [#39111]
Expand Down Expand Up @@ -486,6 +501,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Statically access asset tools

[2.3.8]: https://github.com/Automattic/jetpack-assets/compare/v2.3.7...v2.3.8
[2.3.7]: https://github.com/Automattic/jetpack-assets/compare/v2.3.6...v2.3.7
[2.3.6]: https://github.com/Automattic/jetpack-assets/compare/v2.3.5...v2.3.6
[2.3.5]: https://github.com/Automattic/jetpack-assets/compare/v2.3.4...v2.3.5
[2.3.4]: https://github.com/Automattic/jetpack-assets/compare/v2.3.3...v2.3.4
[2.3.3]: https://github.com/Automattic/jetpack-assets/compare/v2.3.2...v2.3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
"@wordpress/browserslist-config": "6.5.0",
"@wordpress/browserslist-config": "6.7.0",
"jest": "29.7.0",
"md5-es": "1.8.2",
"webpack": "5.94.0",
Expand Down
Loading

0 comments on commit 438a7d1

Please sign in to comment.