Skip to content

Commit

Permalink
Merge pull request #21504 from Yoast/20847-deprecate-the-integration-…
Browse files Browse the repository at this point in the history
…to-disable-concatenate_scripts

Deprecate concatenate scripts integration.
  • Loading branch information
enricobattocchi authored Jul 31, 2024
2 parents 1af223d + 626ca27 commit 1ea5f00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"Yoast\\WP\\SEO\\Composer\\Actions::check_coding_standards"
],
"check-cs-thresholds": [
"@putenv YOASTCS_THRESHOLD_ERRORS=2487",
"@putenv YOASTCS_THRESHOLD_ERRORS=2486",
"@putenv YOASTCS_THRESHOLD_WARNINGS=253",
"Yoast\\WP\\SEO\\Composer\\Actions::check_cs_thresholds"
],
Expand Down
2 changes: 2 additions & 0 deletions config/dependency-injection/deprecated-classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Yoast\WP\SEO\Config\Wordproof_App_Config;
use Yoast\WP\SEO\Config\Wordproof_Translations;
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
use Yoast\WP\SEO\Integrations\Admin\Disable_Concatenate_Scripts_Integration;
use Yoast\WP\SEO\Integrations\Admin\Old_Premium_Integration;
use Yoast\WP\SEO\Integrations\Third_Party\Wincher;
use Yoast\WP\SEO\Integrations\Third_Party\Wordproof;
Expand All @@ -41,6 +42,7 @@
Wordproof_Translations::class => '22.10',
Wordproof_Helper::class => '22.10',
Ai_Generate_Titles_And_Descriptions_Introduction_Upsell::class => '23.2',
Disable_Concatenate_Scripts_Integration::class => '23.2',
];

foreach ( $deprecated_classes as $original_class => $version ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

/**
* Disable_Concatenate_Scripts_Integration class.
*
* @deprecated 23.2
* @codeCoverageIgnore
*/
class Disable_Concatenate_Scripts_Integration implements Integration_Interface {

Expand All @@ -16,6 +19,8 @@ class Disable_Concatenate_Scripts_Integration implements Integration_Interface {
* In this case: when on an admin page.
*
* @return array The conditionals.
*
* @deprecated 23.2
*/
public static function get_conditionals() {
return [ Admin_Conditional::class ];
Expand All @@ -25,9 +30,10 @@ public static function get_conditionals() {
* Registers an action to disable script concatenation.
*
* @return void
* @deprecated 23.2
*/
public function register_hooks() {
\add_action( 'wp_print_scripts', [ $this, 'disable_concatenate_scripts' ] );
\_deprecated_function( __METHOD__, 'Yoast SEO 23.2' );
}

/**
Expand All @@ -38,8 +44,6 @@ public function register_hooks() {
* @return void
*/
public function disable_concatenate_scripts() {
global $concatenate_scripts;

$concatenate_scripts = false;
\_deprecated_function( __METHOD__, 'Yoast SEO 23.2' );
}
}

0 comments on commit 1ea5f00

Please sign in to comment.