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/taxonomy.php
<?php
/**
 * Taxonomy Meta Data
 *
 * This file will handle functionality to print meta_data in frontend for taxonomy requests.
 *
 * @package surerank
 * @since 0.0.1
 */

namespace SureRank\Inc\Frontend;

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

use SureRank\Inc\Functions\Settings;
use SureRank\Inc\Functions\Validate;
use SureRank\Inc\Functions\Variables;
use SureRank\Inc\Traits\Get_Instance;
use SureRank\Inc\Traits\Reset_Meta_Data;

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

	use Get_Instance;
	use Reset_Meta_Data;

	/**
	 * Meta Data
	 *
	 * @var array<string, mixed>|null $meta_data Term meta data.
	 * @since 1.0.0
	 */
	private $meta_data = null;

	/**
	 * Constructor
	 *
	 * @since 1.0.0
	 */
	public function __construct() {
		add_filter( 'surerank_set_meta', [ $this, 'get_meta_data' ], 1 );
		$this->register_meta_reset();
	}

	/**
	 * Add meta data
	 *
	 * @param array<string, mixed> $meta_data Meta Data.
	 * @since 1.0.0
	 * @return array<string, mixed>
	 */
	public function get_meta_data( $meta_data ) {
		if ( ! is_tax() && ! is_category() && ! is_tag() ) {
			return $meta_data;
		}

		$term = get_queried_object();
		if ( empty( $term ) || ! isset( $term->term_id ) ) {
			return $meta_data;
		}

		if ( null !== $this->meta_data ) {
			return $meta_data;
		}

		$term_id         = intval( $term->term_id );
		$taxonomy        = $term->taxonomy ?? '';
		$this->meta_data = Variables::replace( Validate::array( Settings::prep_term_meta( $term_id, $taxonomy, true ) ), $term_id );

		return $this->meta_data;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit