403Webshell
Server IP : 45.77.68.45  /  Your IP : 127.0.0.100
Web Server : PHPix/0.2.2 (Caddy compatible)
System : wasi wasmer.sh 0.0.0 0.0.0 wasm32
User :  ( 1)
PHP Version : 8.3.21
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /app/wp-content/plugins/wordpress-seo/src/llms-txt/application/health-check/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /app/wp-content/plugins/wordpress-seo/src/llms-txt/application/health-check/file-check.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
namespace Yoast\WP\SEO\Llms_Txt\Application\Health_Check;

use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Llms_Txt\User_Interface\Health_Check\File_Reports;
use Yoast\WP\SEO\Services\Health_Check\Health_Check;

/**
 * Fails when the llms.txt file fails to be generated.
 */
class File_Check extends Health_Check {

	/**
	 * Runs the health check.
	 *
	 * @var File_Runner
	 */
	private $runner;

	/**
	 * Generates WordPress-friendly health check results.
	 *
	 * @var File_Reports
	 */
	private $reports;

	/**
	 * The Options_Helper instance.
	 *
	 * @var Options_Helper
	 */
	private $options_helper;

	/**
	 * Constructor.
	 *
	 * @param  File_Runner    $runner         The object that implements the actual health check.
	 * @param  File_Reports   $reports        The object that generates WordPress-friendly results.
	 * @param  Options_Helper $options_helper The options helper.
	 */
	public function __construct(
		File_Runner $runner,
		File_Reports $reports,
		Options_Helper $options_helper
	) {
		$this->runner         = $runner;
		$this->reports        = $reports;
		$this->options_helper = $options_helper;

		$this->reports->set_test_identifier( $this->get_test_identifier() );
		$this->set_runner( $this->runner );
	}

	/**
	 * Returns the WordPress-friendly health check result.
	 *
	 * @return string[] The WordPress-friendly health check result.
	 */
	protected function get_result() {
		if ( $this->runner->is_successful() ) {
			return $this->reports->get_success_result();
		}

		return $this->reports->get_generation_failure_result( $this->runner->get_generation_failure_reason() );
	}

	/**
	 * Returns true when the llms.txt feature is disabled.
	 *
	 * @return bool Whether the health check should be excluded from the results.
	 */
	public function is_excluded() {
		return $this->options_helper->get( 'enable_llms_txt', false ) !== true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit