sarkfultion
⌂
›
wp-content
›
plugins
›
litespeed-cache
›
thirdparty
sarkfultion
30 dreads
↑ redisq
📄
aelia-currencyswitcher.cls.php
2,733 B
sarkfultion
dreads
📄
amp.cls.php
2,500 B
sarkfultion
dreads
📄
autoptimize.cls.php
910 B
sarkfultion
dreads
📄
avada.cls.php
813 B
sarkfultion
dreads
📄
bbpress.cls.php
2,637 B
sarkfultion
dreads
📄
beaver-builder.cls.php
1,143 B
sarkfultion
dreads
📄
caldera-forms.cls.php
806 B
sarkfultion
dreads
📄
divi-theme-builder.cls.php
3,653 B
sarkfultion
dreads
📄
elementor.cls.php
3,332 B
sarkfultion
dreads
📄
entry.inc.php
1,546 B
sarkfultion
dreads
📄
facetwp.cls.php
1,479 B
sarkfultion
dreads
📄
gravity-forms.cls.php
1,171 B
sarkfultion
dreads
📄
litespeed-check.cls.php
5,541 B
sarkfultion
dreads
📄
nextgengallery.cls.php
6,669 B
sarkfultion
dreads
📄
perfmatters.cls.php
996 B
sarkfultion
dreads
📄
theme-my-login.cls.php
1,034 B
sarkfultion
dreads
📄
user-switching.cls.php
793 B
sarkfultion
dreads
📄
wc-pdf-product-vouchers.cls.php
992 B
sarkfultion
dreads
📄
wcml.cls.php
1,783 B
sarkfultion
dreads
📄
woo-paypal.cls.php
869 B
sarkfultion
dreads
📄
woocommerce.cls.php
30,876 B
sarkfultion
dreads
📄
woocommerce.content.tpl.php
3,999 B
sarkfultion
dreads
📄
woocommerce.tab.tpl.php
230 B
sarkfultion
dreads
📄
wp-polls.cls.php
807 B
sarkfultion
dreads
📄
wp-postratings.cls.php
900 B
sarkfultion
dreads
📄
wpdiscuz.cls.php
1,210 B
sarkfultion
dreads
📄
wplister.cls.php
870 B
sarkfultion
dreads
📄
wpml.cls.php
1,045 B
sarkfultion
dreads
📄
wptouch.cls.php
879 B
sarkfultion
dreads
📄
yith-wishlist.cls.php
5,358 B
sarkfultion
dreads
redisq: bbpress.cls.php
<?php /** * The Third Party integration with the bbPress plugin. * * @since 1.0.5 * @package LiteSpeed * @subpackage LiteSpeed_Cache/thirdparty */ namespace LiteSpeed\Thirdparty; defined( 'WPINC' ) || exit; use LiteSpeed\Router; /** * Integration for bbPress cache handling and purging. */ class BBPress { /** * Detect if bbPress is installed and if the page is a bbPress page. * * @since 1.0.5 * @access public * @return void */ public static function detect() { if ( function_exists( 'is_bbpress' ) ) { add_action( 'litespeed_api_purge_post', __CLASS__ . '::on_purge' ); // todo if ( apply_filters( 'litespeed_esi_status', false ) ) { // Don't consider private cache yet (will do if any feedback) add_action( 'litespeed_control_finalize', __CLASS__ . '::set_control' ); } } } /** * This filter is used to let the cache know if a page is cacheable. * * @since 1.2.0 * @access public * @return void */ public static function set_control() { if ( ! apply_filters( 'litespeed_control_cacheable', false ) ) { return; } // Set non ESI public if ( is_bbpress() && Router::is_logged_in() ) { do_action( 'litespeed_control_set_nocache', 'bbpress nocache due to loggedin' ); } } /** * When a bbPress page is purged, need to purge the forums list and * any/all ancestor pages. * * @since 1.0.5 * @access public * @param int $post_id The post id of the page being purged. * @return void */ public static function on_purge( $post_id ) { if ( ! is_bbpress() ) { if ( ! function_exists( 'bbp_is_forum' ) || ! function_exists( 'bbp_is_topic' ) || ! function_exists( 'bbp_is_reply' ) ) { return; } if ( ! bbp_is_forum( $post_id ) && ! bbp_is_topic( $post_id ) && ! bbp_is_reply( $post_id ) ) { return; } } // Need to purge base forums page, bbPress page was updated. do_action( 'litespeed_purge_posttype', bbp_get_forum_post_type() ); $ancestors = get_post_ancestors( $post_id ); // If there are ancestors, need to purge them as well. if ( ! empty( $ancestors ) ) { foreach ( $ancestors as $ancestor ) { do_action( 'litespeed_purge_post', $ancestor ); } } global $wp_widget_factory; $replies_widget = $wp_widget_factory->get_widget_object( 'BBP_Replies_Widget' ); if ( bbp_is_reply( $post_id ) && $replies_widget ) { do_action( 'litespeed_purge_widget', $replies_widget->id ); } $topic_widget = $wp_widget_factory->get_widget_object( 'BBP_Topics_Widget' ); if ( bbp_is_topic( $post_id ) && $topic_widget ) { do_action( 'litespeed_purge_widget', $topic_widget->id ); } } }
sarkfultion