PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.1
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / integrations / admin / disable-concatenate-scripts-integration.php

disable-concatenate-scripts-integration.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.1, at src/integrations/admin/disable-concatenate-scripts-integration.php

44 lines 1006 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations\Admin;
4
5 use Yoast\WP\SEO\Conditionals\Admin_Conditional;
6 use Yoast\WP\SEO\Integrations\Integration_Interface;
7
8 /**
9 * Disable_Concatenate_Scripts_Integration class.
10 */
11 class Disable_Concatenate_Scripts_Integration implements Integration_Interface {
12
13 /**
14 * Returns the conditionals based in which this loadable should be active.
15 *
16 * In this case: when on an admin page.
17 *
18 * @return array The conditionals.
19 */
20 public static function get_conditionals() {
21 return [ Admin_Conditional::class ];
22 }
23
24 /**
25 * Registers an action to disable script concatenation.
26 */
27 public function register_hooks() {
28 \add_action( 'wp_print_scripts', [ $this, 'disable_concatenate_scripts' ] );
29 }
30
31 /**
32 * Due to bugs in the 5.5 core release concatenate scripts is causing errors.
33 *
34 * Because of this we disable it.
35 *
36 * @return void
37 */
38 public function disable_concatenate_scripts() {
39 global $concatenate_scripts;
40
41 $concatenate_scripts = false;
42 }
43 }
44