PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
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 / editors / framework / previously-used-keyphrase.php

previously-used-keyphrase.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI trunk, at src/editors/framework/previously-used-keyphrase.php

46 lines 1.0 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\Editors\Framework;
4
5 use Yoast\WP\SEO\Editors\Domain\Analysis_Features\Analysis_Feature_Interface;
6
7 /**
8 * Describes if the previously used keyword feature should be enabled.
9 */
10 class Previously_Used_Keyphrase implements Analysis_Feature_Interface {
11
12 public const NAME = 'previouslyUsedKeyphrase';
13
14 /**
15 * If this analysis is enabled.
16 *
17 * @return bool If this analysis is enabled.
18 */
19 public function is_enabled(): bool {
20 /**
21 * Filter to determine If the PreviouslyUsedKeyphrase assessment should run.
22 *
23 * @param bool $previouslyUsedKeyphraseActive If the PreviouslyUsedKeyphrase assessment should run.
24 */
25 return (bool) \apply_filters( 'wpseo_previously_used_keyword_active', true );
26 }
27
28 /**
29 * Returns the name of the object.
30 *
31 * @return string
32 */
33 public function get_name(): string {
34 return self::NAME;
35 }
36
37 /**
38 * Gets the legacy key.
39 *
40 * @return string The legacy key.
41 */
42 public function get_legacy_key(): string {
43 return 'previouslyUsedKeywordActive';
44 }
45 }
46