PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
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 19.1 All 128 releases
wordpress-seo / src / initializers / plugin-headers.php

plugin-headers.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/initializers/plugin-headers.php

35 lines 740 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\Initializers;
4
5 use Yoast\WP\SEO\Conditionals\No_Conditionals;
6
7 /**
8 * Adds custom headers to the list of plugin headers to read.
9 */
10 class Plugin_Headers implements Initializer_Interface {
11
12 use No_Conditionals;
13
14 /**
15 * Hooks into the list of the plugin headers.
16 *
17 * @return void
18 */
19 public function initialize() {
20 \add_filter( 'extra_plugin_headers', [ $this, 'add_requires_yoast_seo_header' ] );
21 }
22
23 /**
24 * Add the `Requires Yoast SEO` header to the list of headers.
25 *
26 * @param array<string> $headers The headers.
27 *
28 * @return array<string> The updated headers.
29 */
30 public function add_requires_yoast_seo_header( $headers ) {
31 $headers[] = 'Requires Yoast SEO';
32 return $headers;
33 }
34 }
35