AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 18.223.209.165   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/wordpress-seo/src/services/health-check/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

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

namespace Yoast\WP\SEO\Services\Health_Check;

use WPSEO_Admin_Utils;
use WPSEO_Shortlinker;

/**
 * Presents a set of different messages for the Links_Table health check.
 */
class Links_Table_Reports {

	use Reports_Trait;

	/**
	 * Shortlinker object used to create short links for reports.
	 *
	 * @var WPSEO_Shortlinker
	 */
	private $shortlinker;

	/**
	 * Constructor
	 *
	 * @param  Report_Builder_Factory $report_builder_factory The factory for result builder objects.
	 *                                                        This class uses the report builder to generate WordPress-friendly
	 *                                                        health check results.
	 * @param  WPSEO_Shortlinker      $shortlinker            Object used to add short links to the report description.
	 */
	public function __construct(
		Report_Builder_Factory $report_builder_factory,
		WPSEO_Shortlinker $shortlinker
	) {
		$this->report_builder_factory = $report_builder_factory;
		$this->shortlinker            = $shortlinker;
	}

	/**
	 * Returns the message for a successful health check.
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_success_result() {
		return $this->get_report_builder()
			->set_label( \__( 'The text link counter is working as expected', 'wordpress-seo' ) )
			->set_status_good()
			->set_description( $this->get_success_description() )
			->build();
	}

	/**
	 * Returns the message for a failed health check.
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_links_table_not_accessible_result() {
		return $this->get_report_builder()
			->set_label( \__( 'The text link counter feature is not working as expected', 'wordpress-seo' ) )
			->set_status_recommended()
			->set_description( $this->get_links_table_not_accessible_description() )
			->set_actions( $this->get_actions() )
			->build();
	}

	/**
	 * Returns the description for when the health check was successful.
	 *
	 * @return string The description as a string.
	 */
	private function get_success_description() {
		return \sprintf(
			/* translators: 1: Link to the Yoast SEO blog, 2: Link closing tag. */
			\esc_html__( 'The text link counter helps you improve your site structure. %1$sFind out how the text link counter can enhance your SEO%2$s.', 'wordpress-seo' ),
			'<a href="' . $this->shortlinker->get( 'https://yoa.st/3zw' ) . '" target="_blank">',
			WPSEO_Admin_Utils::get_new_tab_message() . '</a>'
		);
	}

	/**
	 * Returns the description for when the health couldn't access the links table.
	 *
	 * @return string The description as a string.
	 */
	private function get_links_table_not_accessible_description() {
		return \sprintf(
			/* translators: 1: Yoast SEO. */
			\__( 'For this feature to work, %1$s needs to create a table in your database. We were unable to create this table automatically.', 'wordpress-seo' ),
			'Yoast SEO'
		);
	}

	/**
	 * Returns the actions that the user should take when the links table is not accessible.
	 *
	 * @return string The actions as a string.
	 */
	private function get_actions() {
		return \sprintf(
			/* translators: 1: Link to the Yoast help center, 2: Link closing tag. */
			\esc_html__( '%1$sFind out how to solve this problem on our help center%2$s.', 'wordpress-seo' ),
			'<a href="' . $this->shortlinker->get( 'https://yoa.st/3zv' ) . '" target="_blank">',
			WPSEO_Admin_Utils::get_new_tab_message() . '</a>'
		);
	}
}

Anon7 - 2022
AnonSec Team