options_helper = $options_helper; } /** * Returns whether this task is completed. * * @return bool Whether this task is completed. */ public function get_is_completed(): bool { return $this->options_helper->get( 'enable_llms_txt', false ); } /** * Returns the task's link. * * @return string|null */ public function get_link(): ?string { return null; } /** * Completes a task. * * @return void * * @throws Complete_LLMS_Task_Exception If the option could not be set. */ public function complete_task(): void { $result = $this->options_helper->set( 'enable_llms_txt', true ); if ( ! $result ) { throw new Complete_LLMS_Task_Exception(); } } /** * Returns the task's call to action entry. * * @return Call_To_Action_Entry|null */ public function get_call_to_action(): ?Call_To_Action_Entry { return new Call_To_Action_Entry( \__( 'Enable llms.txt', 'wordpress-seo' ), 'default', $this->get_link(), ); } /** * Returns the task's copy set. * * @return string|null */ public function get_copy_set(): Copy_Set { return new Copy_Set( \__( 'Create an llms.txt file', 'wordpress-seo' ), '

' . \__( 'Without llms.txt, AI platforms may not know how to treat your content. Enabling it helps communicate your preferences in a clearer way to AI tools.', 'wordpress-seo' ) . '

', ); } /** * Returns whether the task is valid. * * @return bool */ public function is_valid(): bool { return ! \is_multisite(); } }