Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/litespee.../thirdpar...
File: wpdiscuz.cls.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The Third Party integration with Wpdiscuz.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 2.9.5
[4] Fix | Delete
* @package LiteSpeed
[5] Fix | Delete
* @subpackage LiteSpeed_Cache/thirdparty
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
namespace LiteSpeed\Thirdparty;
[9] Fix | Delete
[10] Fix | Delete
defined( 'WPINC' ) || exit();
[11] Fix | Delete
[12] Fix | Delete
use LiteSpeed\API;
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Wpdiscuz integration for LiteSpeed Cache.
[16] Fix | Delete
*
[17] Fix | Delete
* Appends commenter vary and disables pending-check when a commenter is detected.
[18] Fix | Delete
*/
[19] Fix | Delete
class Wpdiscuz {
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Registers hooks when Wpdiscuz is active.
[23] Fix | Delete
*
[24] Fix | Delete
* @since 2.9.5
[25] Fix | Delete
* @return void
[26] Fix | Delete
*/
[27] Fix | Delete
public static function detect() {
[28] Fix | Delete
if ( ! defined( 'WPDISCUZ_DS' ) ) {
[29] Fix | Delete
return;
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
self::check_commenter();
[33] Fix | Delete
add_action( 'wpdiscuz_add_comment', __CLASS__ . '::add_comment' );
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* Appends the commenter vary on new Wpdiscuz comments.
[38] Fix | Delete
*
[39] Fix | Delete
* @since 2.9.5
[40] Fix | Delete
* @return void
[41] Fix | Delete
*/
[42] Fix | Delete
public static function add_comment() {
[43] Fix | Delete
API::vary_append_commenter();
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
/**
[47] Fix | Delete
* Checks current commenter and disables pending vary check if a name exists.
[48] Fix | Delete
*
[49] Fix | Delete
* @since 2.9.5
[50] Fix | Delete
* @return void
[51] Fix | Delete
*/
[52] Fix | Delete
public static function check_commenter() {
[53] Fix | Delete
$commentor = wp_get_current_commenter();
[54] Fix | Delete
[55] Fix | Delete
if (strlen($commentor['comment_author']) > 0) {
[56] Fix | Delete
add_filter( 'litespeed_vary_check_commenter_pending', '__return_false' );
[57] Fix | Delete
}
[58] Fix | Delete
}
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function