PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 27.6
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v27.6
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 / third-party / web-stories-post-edit.php

web-stories-post-edit.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 27.6, at src/integrations/third-party/web-stories-post-edit.php

48 lines 1.2 KB
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\Third_Party;
4
5 use Yoast\WP\SEO\Conditionals\Admin\Post_Conditional;
6 use Yoast\WP\SEO\Conditionals\Web_Stories_Conditional;
7 use Yoast\WP\SEO\Integrations\Integration_Interface;
8
9 /**
10 * Web Stories integration.
11 */
12 class Web_Stories_Post_Edit implements Integration_Interface {
13
14 /**
15 * Returns the conditionals based in which this loadable should be active.
16 *
17 * @return array
18 */
19 public static function get_conditionals() {
20 return [ Web_Stories_Conditional::class, Post_Conditional::class ];
21 }
22
23 /**
24 * Initializes the integration.
25 *
26 * This is the place to register hooks and filters.
27 *
28 * @return void
29 */
30 public function register_hooks() {
31 \add_filter( 'wpseo_admin_l10n', [ $this, 'add_admin_l10n' ] );
32 }
33
34 /**
35 * Adds a isWebStoriesIntegrationActive variable to the Adminl10n array.
36 *
37 * @param array $input The array to add the isWebStoriesIntegrationActive to.
38 *
39 * @return array The passed array with the additional isWebStoriesIntegrationActive variable set to 1 if we are editing a web story.
40 */
41 public function add_admin_l10n( $input ) {
42 if ( \get_post_type() === 'web-story' ) {
43 $input['isWebStoriesIntegrationActive'] = 1;
44 }
45 return $input;
46 }
47 }
48