• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / e57e01309ec9fc3afc714e6ce0fd243e7b6d1f90

27 May 2025 12:40PM UTC coverage: 45.733%. First build
e57e01309ec9fc3afc714e6ce0fd243e7b6d1f90

Pull #22275

github

web-flow
Merge f0a8d33c9 into 5f64dc203
Pull Request #22275: Move and refactor ai generator rest endpoints

0 of 392 new or added lines in 26 files covered. (0.0%)

15548 of 33997 relevant lines covered (45.73%)

3.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/conditionals/ai-conditional.php
1
<?php
2

3
namespace Yoast\WP\SEO\Conditionals;
4

5
use Yoast\WP\SEO\Helpers\Options_Helper;
6

7
/**
8
 * Conditional for the Yoast AI feature.
9
 */
10
class AI_Conditional implements Conditional {
11

12
        /**
13
         * The options helper.
14
         *
15
         * @var Options_Helper
16
         */
17
        private $options;
18

19
        /**
20
         * The constructor.
21
         *
22
         * @param Options_Helper $options The options helper.
23
         */
NEW
24
        public function __construct( Options_Helper $options ) {
×
NEW
25
                $this->options = $options;
×
26
        }
27

28
        /**
29
         * Returns `true` when Yoast AI is enabled.
30
         *
31
         * @return bool `true` when Yoast AI is enabled.
32
         */
NEW
33
        public function is_met(): bool {
×
NEW
34
                return $this->options->get( 'enable_ai_generator' ) === true;
×
35
        }
36
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc