Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/litespee.../thirdpar...
File: wp-postratings.cls.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The Third Party integration with the WP-PostRatings plugin.
[2] Fix | Delete
*
[3] Fix | Delete
* Hooks into rating events to purge related caches.
[4] Fix | Delete
*
[5] Fix | Delete
* @since 1.1.1
[6] Fix | Delete
* @package LiteSpeed
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
namespace LiteSpeed\Thirdparty;
[10] Fix | Delete
[11] Fix | Delete
defined( 'WPINC' ) || exit();
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* WP-PostRatings integration for LiteSpeed Cache.
[15] Fix | Delete
*/
[16] Fix | Delete
class WP_PostRatings {
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Detects if the WP-PostRatings plugin is active and registers hooks.
[20] Fix | Delete
*
[21] Fix | Delete
* @since 1.1.1
[22] Fix | Delete
* @return void
[23] Fix | Delete
*/
[24] Fix | Delete
public static function detect() {
[25] Fix | Delete
if ( defined( 'WP_POSTRATINGS_VERSION' ) ) {
[26] Fix | Delete
add_action( 'rate_post', __CLASS__ . '::flush', 10, 3 );
[27] Fix | Delete
}
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Purge the cache for a rated post.
[32] Fix | Delete
*
[33] Fix | Delete
* @since 1.1.1
[34] Fix | Delete
*
[35] Fix | Delete
* @param int $uid User ID who rated.
[36] Fix | Delete
* @param int $post_id The rated post ID.
[37] Fix | Delete
* @return void
[38] Fix | Delete
*/
[39] Fix | Delete
public static function flush( $uid, $post_id ) {
[40] Fix | Delete
do_action( 'litespeed_purge_post', (int) $post_id );
[41] Fix | Delete
}
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function