Skip to content

Commit

Permalink
Merge branch 'release/23.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
YoastBot committed Nov 5, 2024
2 parents abba4d5 + c4d5c27 commit 6598ee8
Show file tree
Hide file tree
Showing 124 changed files with 5,201 additions and 2,802 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deprecation-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- name: Place a comment on the PR
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0
uses: thollander/actions-comment-pull-request@e2c37e53a7d2227b61585343765f73a9ca57eda9 # v3.0.0
with:
message: |
@${{ github.actor }} Please be aware that following packages have been abandoned and are not actively maintained anymore:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finish-coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ jobs:
COVERALLS_SERVICE_NUMBER: ${{ github.sha }} # Connect all builds together.
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
carryforward: "unit-php-7.2,unit-php-8.3,php-7.2-wp-6.3,php-7.2-wp-6.3-ms,php-8.3-wp-trunk,php-8.3-wp-trunk-ms,package-analysis-report,package-browserslist-config,package-components,package-feature-flag,package-helpers,package-js,package-replacement-variable-editor,package-search-metadata-previews,package-social-metadata-forms,package-social-metadata-previews,package-yoastseo"
carryforward: "unit-php-7.2,unit-php-8.3,php-7.2-wp-6.5,php-7.2-wp-6.5-ms,php-8.3-wp-latest,php-8.3-wp-latest-ms,package-analysis-report,package-browserslist-config,package-components,package-feature-flag,package-helpers,package-js,package-replacement-variable-editor,package-search-metadata-previews,package-social-metadata-forms,package-social-metadata-previews,package-yoastseo"
parallel-finished: true
17 changes: 12 additions & 5 deletions admin/class-admin-asset-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,21 @@ public function enqueue_user_language_script() {
* @return void
*/
public function register_script( WPSEO_Admin_Asset $script ) {
$url = $script->get_src() ? $this->get_url( $script, WPSEO_Admin_Asset::TYPE_JS ) : false;
$url = $script->get_src() ? $this->get_url( $script, WPSEO_Admin_Asset::TYPE_JS ) : false;
$args = [
'in_footer' => $script->is_in_footer(),
];

if ( $script->get_strategy() !== '' ) {
$args['strategy'] = $script->get_strategy();
}

wp_register_script(
$this->prefix . $script->get_name(),
$url,
$script->get_deps(),
$script->get_version(),
$script->is_in_footer()
$args
);

if ( in_array( 'wp-i18n', $script->get_deps(), true ) ) {
Expand Down Expand Up @@ -313,7 +320,7 @@ protected function scripts_to_be_registered() {
self::PREFIX . 'externals-contexts',
self::PREFIX . 'externals-redux',
],
'new-dashboard' => [
'general-page' => [
self::PREFIX . 'api-client',
],
];
Expand Down Expand Up @@ -664,8 +671,8 @@ protected function styles_to_be_registered() {
'deps' => [ self::PREFIX . 'tailwind' ],
],
[
'name' => 'new-dashboard',
'src' => 'new-dashboard-' . $flat_version,
'name' => 'general-page',
'src' => 'general-page-' . $flat_version,
'deps' => [ self::PREFIX . 'tailwind' ],
],
[
Expand Down
3 changes: 1 addition & 2 deletions admin/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @package WPSEO\Admin
*/

use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
use Yoast\WP\SEO\Integrations\Settings_Integration;

/**
Expand Down Expand Up @@ -242,7 +241,7 @@ public function add_action_link( $links, $file ) {
$configuration_title = ( ! $first_time_configuration_notice_helper->should_show_alternate_message() ) ? 'first-time configuration' : 'SEO configuration';
/* translators: CTA to finish the first time configuration. %s: Either first-time SEO configuration or SEO configuration. */
$message = sprintf( __( 'Finish your %s', 'wordpress-seo' ), $configuration_title );
$ftc_page = ( ( new New_Dashboard_Ui_Conditional() )->is_met() ) ? 'admin.php?page=wpseo_dashboard#/first-time-configuration' : 'admin.php?page=wpseo_dashboard#top#first-time-configuration';
$ftc_page = 'admin.php?page=wpseo_dashboard#/first-time-configuration';
$ftc_link = '<a href="' . esc_url( admin_url( $ftc_page ) ) . '" target="_blank">' . $message . '</a>';
array_unshift( $links, $ftc_link );
}
Expand Down
18 changes: 18 additions & 0 deletions admin/class-asset.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ class WPSEO_Admin_Asset {
*/
protected $in_footer;

/**
* For JS Assets. The script's async/defer strategy.
*
* @var string
*/
protected $strategy;

/**
* For CSS Assets. Whether this stylesheet is a right-to-left stylesheet.
*
Expand All @@ -147,6 +154,7 @@ class WPSEO_Admin_Asset {
'media' => 'all',
'version' => '',
'suffix' => '',
'strategy' => '',
];

/**
Expand All @@ -173,6 +181,7 @@ public function __construct( array $args ) {
$this->version = $args['version'];
$this->media = $args['media'];
$this->in_footer = $args['in_footer'];
$this->strategy = $args['strategy'];
$this->rtl = $args['rtl'];
$this->suffix = $args['suffix'];
}
Expand Down Expand Up @@ -235,6 +244,15 @@ public function is_in_footer() {
return $this->in_footer;
}

/**
* Returns the script asset's async/defer loading strategy.
*
* @return string
*/
public function get_strategy() {
return $this->strategy;
}

/**
* Returns whether this CSS has a RTL counterpart.
*
Expand Down
10 changes: 3 additions & 7 deletions admin/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/

use Yoast\WP\SEO\Actions\Alert_Dismissal_Action;
use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
use Yoast\WP\SEO\Dashboard\User_Interface\New_Dashboard_Page_Integration;
use Yoast\WP\SEO\General\User_Interface\General_Page_Integration;
use Yoast\WP\SEO\Integrations\Academy_Integration;
use Yoast\WP\SEO\Integrations\Settings_Integration;
use Yoast\WP\SEO\Integrations\Support_Integration;
Expand Down Expand Up @@ -53,11 +52,8 @@ public function init() {
$page = isset( $_GET['page'] ) && is_string( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';

// Don't load the scripts for the following pages.
$page_exceptions = in_array( $page, [ Settings_Integration::PAGE, Academy_Integration::PAGE, Support_Integration::PAGE ], true );
// Don't load the scripts for the new dashboard page, but only if the feature flag is enabled.
$new_dashboard_conditional = new New_Dashboard_Ui_Conditional();
$new_dashboard_page = ( $page === New_Dashboard_Page_Integration::PAGE && $new_dashboard_conditional->is_met() );

$page_exceptions = in_array( $page, [ Settings_Integration::PAGE, Academy_Integration::PAGE, Support_Integration::PAGE ], true );
$new_dashboard_page = ( $page === General_Page_Integration::PAGE && ! is_network_admin() );
if ( $page_exceptions || $new_dashboard_page ) {
// Bail, this is managed in the applicable integration.
return;
Expand Down
4 changes: 2 additions & 2 deletions admin/class-gutenberg-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
public const CURRENT_RELEASE = '19.4.0';
public const CURRENT_RELEASE = '19.5.0';

/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
public const MINIMUM_SUPPORTED = '19.4.0';
public const MINIMUM_SUPPORTED = '19.5.0';

/**
* Holds the current version.
Expand Down
5 changes: 0 additions & 5 deletions admin/menu/class-admin-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @package WPSEO\Admin\Menu
*/

use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;
/**
* Registers the admin menu on the left of the admin area.
*/
Expand Down Expand Up @@ -98,10 +97,6 @@ public function get_submenu_pages() {
$this->get_submenu_page( $this->get_license_page_title(), 'wpseo_licenses' ),
];

if ( ! ( new New_Dashboard_Ui_Conditional() )->is_met() ) {
array_unshift( $submenu_pages, $this->get_submenu_page( __( 'General', 'wordpress-seo' ), $this->get_page_identifier() ) );
}

/**
* Filter: 'wpseo_submenu_pages' - Collects all submenus that need to be shown.
*
Expand Down
4 changes: 1 addition & 3 deletions admin/views/tabs/tool/import-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* @package WPSEO\Admin\Views
*/

use Yoast\WP\SEO\Conditionals\New_Dashboard_Ui_Conditional;

if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
Expand Down Expand Up @@ -102,7 +100,7 @@ function wpseo_import_external_select( $name, $plugins ) {
<h3><?php esc_html_e( 'Step 4: Go through the first time configuration', 'wordpress-seo' ); ?></h3>
<p>
<?php
$ftc_page = ( ( new New_Dashboard_Ui_Conditional() )->is_met() ) ? 'admin.php?page=wpseo_dashboard#/first-time-configuration' : 'admin.php?page=wpseo_dashboard#top#first-time-configuration';
$ftc_page = 'admin.php?page=wpseo_dashboard#/first-time-configuration';
printf(
/* translators: 1: Link start tag to the First time configuration tab in the General page, 2: Link closing tag. */
esc_html__( 'You should finish the %1$sfirst time configuration%2$s to make sure your SEO data has been optimized and you’ve set the essential Yoast SEO settings for your site.', 'wordpress-seo' ),
Expand Down
3 changes: 3 additions & 0 deletions apps/content-analysis/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
extends: yoast
root: true

settings:
react: { version: detect }

rules:
require-jsdoc: 0
react/prop-types: 0
Expand Down
2 changes: 1 addition & 1 deletion apps/content-analysis/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
18
3 changes: 3 additions & 0 deletions apps/content-analysis/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [ "@babel/preset-env" ],
};
172 changes: 86 additions & 86 deletions apps/content-analysis/package.json
Original file line number Diff line number Diff line change
@@ -1,88 +1,88 @@
{
"name": "@yoast/content-analysis-app",
"version": "0.10.0",
"private": true,
"dependencies": {
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@svgr/webpack": "^8.1.0",
"@wordpress/i18n": "^3.1.1",
"@yoast/analysis-report": "^1.21.0",
"@yoast/components": "^2.19.0",
"@yoast/style-guide": "^0.13.0",
"babel-loader": "8.0.6",
"babel-plugin-named-asset-import": "^0.3.5",
"babel-polyfill": "^6.26.0",
"babel-preset-react-app": "^10.0.1",
"benchmark": "^2.1.4",
"bfj": "7.0.1",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"chalk": "3.0.0",
"css-loader": "3.2.1",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"eslint": "^6.7.2",
"eslint-config-react-app": "^5.1.0",
"eslint-config-yoast": "^5.0.17",
"eslint-loader": "3.0.2",
"file-loader": "5.0.2",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "8.1.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"lodash-es": "^4.17.15",
"material-ui": "^0.20.2",
"mini-css-extract-plugin": "0.8.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.5.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "^8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"prop-types": "^15.6.2",
"react": "^16.12.0",
"react-app-polyfill": "^1.0.5",
"react-dev-utils": "^11.0.4",
"react-dom": "^16.12.0",
"react-json-view": "^1.21.3",
"react-redux": "^7.1.3",
"react-select": "^3.0.8",
"react-table": "^6.8.6",
"redux": "^4.0.4",
"redux-localstorage-simple": "^2.1.4",
"redux-thunk": "^2.3.0",
"resolve": "1.13.1",
"resolve-url-loader": "^3.1.1",
"sass-loader": "8.0.0",
"style-loader": "1.0.1",
"styled-components": "^4.4.1",
"terser-webpack-plugin": "2.2.1",
"url-loader": "3.0.0",
"webpack": "4.41.2",
"webpack-dev-server": "3.9.0",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1",
"worker-loader": "^2.0.0",
"yoastseo": "../../packages/yoastseo",
"yoastspec": "../../packages/yoastseo/spec"
},
"scripts": {
"start": "node scripts/start.js",
"start-recalibration": "YOAST_RECALIBRATION=enabled node scripts/start.js",
"build": "node scripts/build.js",
"lint": "eslint src"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"babel": {
"presets": [
"react-app"
]
}
"name": "@yoast/content-analysis-app",
"version": "0.10.0",
"private": true,
"dependencies": {
"@babel/core": "^7.25.8",
"@babel/eslint-parser": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@svgr/webpack": "^8.1.0",
"@wordpress/i18n": "^3.1.1",
"@yoast/analysis-report": "^1.21.0",
"@yoast/components": "^2.19.0",
"@yoast/style-guide": "^0.14.0-alpha.0",
"babel-loader": "8.0.6",
"babel-plugin-named-asset-import": "^0.3.5",
"babel-polyfill": "^6.26.0",
"babel-preset-react-app": "^10.0.1",
"benchmark": "^2.1.4",
"bfj": "7.0.1",
"case-sensitive-paths-webpack-plugin": "2.2.0",
"chalk": "3.0.0",
"css-loader": "3.2.1",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"eslint": "^6.7.2",
"eslint-config-react-app": "^5.1.0",
"eslint-config-yoast": "^5.0.17",
"eslint-loader": "3.0.2",
"file-loader": "5.0.2",
"fork-ts-checker-webpack-plugin-alt": "0.4.14",
"fs-extra": "8.1.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "4.0.0-alpha.2",
"identity-obj-proxy": "3.0.0",
"lodash-es": "^4.17.21",
"material-ui": "^0.20.2",
"mini-css-extract-plugin": "0.8.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.5.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-normalize": "^8.0.1",
"postcss-preset-env": "6.7.0",
"postcss-safe-parser": "4.0.1",
"prop-types": "^15.6.2",
"react": "^16.14.0",
"react-app-polyfill": "^1.0.5",
"react-dev-utils": "^11.0.4",
"react-dom": "^16.14.0",
"react-json-view": "^1.21.3",
"react-redux": "^7.2.9",
"react-select": "^3.0.8",
"react-table": "^6.8.6",
"redux": "^4.0.4",
"redux-localstorage-simple": "^2.1.4",
"redux-thunk": "^2.3.0",
"resolve": "1.13.1",
"resolve-url-loader": "^3.1.1",
"sass-loader": "8.0.0",
"style-loader": "1.0.1",
"styled-components": "^4.4.1",
"terser-webpack-plugin": "2.2.1",
"url-loader": "3.0.0",
"webpack": "^4.47.0",
"webpack-dev-server": "^3.11.3",
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "4.3.1",
"worker-loader": "^2.0.0",
"yoastseo": "../../packages/yoastseo",
"yoastspec": "../../packages/yoastseo/spec"
},
"scripts": {
"start": "node --openssl-legacy-provider scripts/start.js",
"start-recalibration": "YOAST_RECALIBRATION=enabled node --openssl-legacy-provider scripts/start.js",
"build": "node --openssl-legacy-provider scripts/build.js",
"lint": "eslint src"
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
"babel": {
"presets": [
"react-app"
]
}
}
Loading

0 comments on commit 6598ee8

Please sign in to comment.