AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.149.242.177   [ 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/postname-permalink-reports.php
<?php

namespace Yoast\WP\SEO\Services\Health_Check;

/**
 * Presents a set of different messages for the Postname_Permalink health check.
 */
class Postname_Permalink_Reports {

	use Reports_Trait;

	/**
	 * 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.
	 */
	public function __construct( Report_Builder_Factory $report_builder_factory ) {
		$this->report_builder_factory = $report_builder_factory;
	}

	/**
	 * Returns the report for when permalinks are set to contain the post name.
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_success_result() {
		return $this->get_report_builder()
			->set_label( \esc_html__( 'Your permalink structure includes the post name', 'wordpress-seo' ) )
			->set_status_good()
			->set_description( \__( 'You do have your postname in the URL of your posts and pages.', 'wordpress-seo' ) )
			->build();
	}

	/**
	 * Returns the report for when permalinks are not set to contain the post name.
	 *
	 * @return string[] The message as a WordPress site status report.
	 */
	public function get_has_no_postname_in_permalink_result() {
		return $this->get_report_builder()
			->set_label( \__( 'You do not have your postname in the URL of your posts and pages', 'wordpress-seo' ) )
			->set_status_recommended()
			->set_description( $this->get_has_no_postname_in_permalink_description() )
			->set_actions( $this->get_has_no_postname_in_permalink_actions() )
			->build();
	}

	/**
	 * Returns the description for when permalinks are not set to contain the post name.
	 *
	 * @return string The description as a string.
	 */
	private function get_has_no_postname_in_permalink_description() {
		return \sprintf(
			/* translators: %s expands to '/%postname%/' */
			\__( 'It\'s highly recommended to have your postname in the URL of your posts and pages. Consider setting your permalink structure to %s.', 'wordpress-seo' ),
			'<strong>/%postname%/</strong>'
		);
	}

	/**
	 * Returns the actions for when permalinks are not set to contain the post name.
	 *
	 * @return string The actions as a string.
	 */
	private function get_has_no_postname_in_permalink_actions() {
		return \sprintf(
			/* translators: %1$s is a link start tag to the permalink settings page, %2$s is the link closing tag. */
			\__( 'You can fix this on the %1$sPermalink settings page%2$s.', 'wordpress-seo' ),
			'<a href="' . \admin_url( 'options-permalink.php' ) . '">',
			'</a>'
		);
	}
}

Anon7 - 2022
AnonSec Team