Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/surerank/inc/frontend/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/surerank/inc/frontend/common.php
<?php
/**
 * Common Meta Data
 *
 * This file will handle functionality to print meta_data in frontend for different requests.
 *
 * @package surerank
 * @since 0.0.1
 */

namespace SureRank\Inc\Frontend;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

use SureRank\Inc\Functions\Validate;
use SureRank\Inc\Traits\Get_Instance;

/**
 * Common SEO
 * This class will handle functionality to print meta_data in frontend for different requests.
 *
 * @since 1.0.0
 */
class Common {

	use Get_Instance;

	/**
	 * Constructor
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
		add_action( 'surerank_print_meta', [ $this, 'common_meta' ], 1, 1 );
		add_filter( 'pre_get_document_title', [ $this, 'get_document_title' ], 1, 1 );
	}

	/**
	 * Add meta data
	 *
	 * @param array<string, mixed> $meta_data Meta Data.
	 * @since 1.0.0
	 * @return void
	 */
	public function common_meta( $meta_data ) {
		$this->print_page_description( $meta_data );
	}

	/**
	 * Print the Page Description meta
	 *
	 * @param array<string, mixed> $meta_data Meta Data.
	 * @since 1.0.0
	 * @return void
	 */
	public function print_page_description( $meta_data ) {

		$description = $meta_data['page_description'] ?? '';

		if ( ! empty( $description ) && Validate::string( $description ) ) {
			Meta_Data::get_instance()->meta_html_template( 'description', $description );
		}
	}

	/**
	 * Get the document title
	 *
	 * @param string $title Document Title.
	 * @since 1.0.0
	 * @return string $title
	 */
	public function get_document_title( $title ) {
		$meta_data = Meta_Data::get_instance()->get_meta_data();
		if ( ! empty( $meta_data['page_title'] ) && Validate::string( $meta_data['page_title'] ) ) {
			$title = esc_html( $meta_data['page_title'] );
		}

		return $title;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit