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

Yoast / wordpress-seo / f9df06f1cab00cec98a3469d2f22da266b46b49b

19 Nov 2025 01:38PM UTC coverage: 52.718% (+0.001%) from 52.717%
f9df06f1cab00cec98a3469d2f22da266b46b49b

Pull #22731

github

web-flow
Merge 10a33f2e3 into cf9a5ebaa
Pull Request #22731: Misc improvements for the backend of the tasklist

8307 of 15558 branches covered (53.39%)

Branch coverage included in aggregate %.

0 of 16 new or added lines in 5 files covered. (0.0%)

3 existing lines in 3 files now uncovered.

31810 of 60539 relevant lines covered (52.54%)

47628.91 hits per line

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

0.0
/src/task-list/application/tasks/enable-llms-txt.php
1
<?php
2
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
3
namespace Yoast\WP\SEO\Task_List\Application\Tasks;
4

5
use Yoast\WP\SEO\Helpers\Options_Helper;
6
use Yoast\WP\SEO\Task_List\Domain\Components\Call_To_Action_Entry;
7
use Yoast\WP\SEO\Task_List\Domain\Components\Copy_Set;
8
use Yoast\WP\SEO\Task_List\Domain\Tasks\Abstract_Completeable_Task;
9

10
/**
11
 * Represents the task for the enabling the llms.txt file.
12
 */
13
class Enable_Llms_Txt extends Abstract_Completeable_Task {
14

15
        /**
16
         * Holds the id.
17
         *
18
         * @var string
19
         */
20
        protected $id = 'enable-llms-txt';
21

22
        /**
23
         * Holds the priority.
24
         *
25
         * @var string
26
         */
27
        protected $priority = 'medium';
28

29
        /**
30
         * Holds the duration.
31
         *
32
         * @var int
33
         */
34
        protected $duration = 1;
35

36
        /**
37
         * Holds the options helper.
38
         *
39
         * @var Options_Helper
40
         */
41
        private $options_helper;
42

43
        /**
44
         * Constructs the task.
45
         *
46
         * @param Options_Helper $options_helper The options helper.
47
         */
48
        public function __construct( Options_Helper $options_helper ) {
×
49
                $this->options_helper = $options_helper;
×
50
        }
51

52
        /**
53
         * Returns whether this task is completed.
54
         *
55
         * @return bool Whether this task is completed.
56
         */
57
        public function get_is_completed(): bool {
×
58
                return $this->options_helper->get( 'enable_llms_txt', false );
×
59
        }
60

61
        /**
62
         * Returns the task's link.
63
         *
64
         * @return string|null
65
         */
66
        public function get_link(): ?string {
×
67
                return null;
×
68
        }
69

70
        /**
71
         * Completes a task.
72
         *
73
         * @return void
74
         */
75
        public function complete_task(): void {
×
76
                $this->options_helper->set( 'enable_llms_txt', true );
×
77
        }
78

79
        /**
80
         * Returns the task's call to action entry.
81
         *
82
         * @return string|null
83
         */
84
        public function get_call_to_action(): Call_To_Action_Entry {
×
85
                return new Call_To_Action_Entry(
×
86
                        \__( 'Enable llms.txt', 'wordpress-seo' ),
×
87
                        'default',
×
88
                        $this->get_link()
×
89
                );
×
90
        }
91

92
        /**
93
         * Returns the task's copy set.
94
         *
95
         * @return string|null
96
         */
97
        public function get_copy_set(): Copy_Set {
×
98
                return new Copy_Set(
×
99
                        \__( 'Create an llms.txt file', 'wordpress-seo' ),
×
NEW
100
                        \__( 'Without llms.txt, AI crawlers may not know how to treat your content. Publishing it helps communicate your preferences in a clearer way to AI tools.', 'wordpress-seo' )
×
101
                );
×
102
        }
103
}
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

© 2026 Coveralls, Inc