403Webshell
Server IP : 104.21.93.192  /  Your IP : 216.73.216.73
Web Server : LiteSpeed
System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : redwjova ( 1790)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /home/redwjova/www/wp-content/plugins/wordpress-seo/src/services/health-check/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/redwjova/www/wp-content/plugins/wordpress-seo/src/services/health-check/links-table-check.php
<?php

namespace Yoast\WP\SEO\Services\Health_Check;

use Yoast\WP\SEO\Conditionals\Should_Index_Links_Conditional;

/**
 * Passes when the links table is accessible.
 */
class Links_Table_Check extends Health_Check {

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

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

	/**
	 * The conditional that checks if the links table should be indexed.
	 *
	 * @var Should_Index_Links_Conditional
	 */
	private $should_index_links_conditional;

	/**
	 * Constructor.
	 *
	 * @param Links_Table_Runner             $runner                         The object that implements the actual health check.
	 * @param Links_Table_Reports            $reports                        The object that generates WordPress-friendly results.
	 * @param Should_Index_Links_Conditional $should_index_links_conditional The conditional that checks if the links table should be indexed.
	 */
	public function __construct(
		Links_Table_Runner $runner,
		Links_Table_Reports $reports,
		Should_Index_Links_Conditional $should_index_links_conditional
	) {
		$this->runner                         = $runner;
		$this->reports                        = $reports;
		$this->should_index_links_conditional = $should_index_links_conditional;

		$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_links_table_not_accessible_result();
	}

	/**
	 * Returns whether the health check should be excluded from the results.
	 *
	 * @return bool false, because it's not excluded.
	 */
	public function is_excluded() {
		return ! $this->should_index_links_conditional->is_met();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit