Plugin Directory

Changeset 2706800


Ignore:
Timestamp:
04/08/2022 06:54:10 AM (4 years ago)
Author:
proofratings
Message:

version 1.1.2

Location:
proofratings
Files:
436 added
3 edited

Legend:

Unmodified
Added
Removed
  • proofratings/trunk/inc/class-proofratings.php

    r2688628 r2706800  
    128128            );
    129129
    130            
    131130            if ( $get_location = $wpdb->get_row("SELECT * FROM $wpdb->proofratings WHERE location_id = '$id'") ) {
    132131
     
    157156
    158157        update_option( 'proofratings_status', $request->get_param('status'));
     158
     159        $this->clear_cache();
     160    }
     161
     162    /**
     163     * Clear cache
     164     * @since 1.1.2
     165     */
     166    public function clear_cache() {
     167        if ( function_exists( 'wp_cache_flush' ) ) {
     168            wp_cache_flush();
     169        }
     170
     171        // Super Cache Plugin - https://wordpress.org/plugins/wp-super-cache/
     172        if ( function_exists( 'wp_cache_clear_cache' ) ) {
     173            wp_cache_clear_cache( is_multisite() && is_plugin_active_for_network( PROOFRATINGS_PLUGIN_BASENAME ) ? get_current_blog_id() : 0 );
     174        }
     175
     176        // W3 Total Cache Plugin - https://wordpress.org/plugins/w3-total-cache/
     177        if ( function_exists( 'w3tc_flush_all' ) ) {
     178            w3tc_flush_all();
     179        }
     180       
     181        // WP Fastest Cache Plugin - https://wordpress.org/plugins/wp-fastest-cache/
     182        if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
     183            $GLOBALS['wp_fastest_cache']->deleteCache( true );
     184        }
     185
     186        // Cache Enabler Plugin - https://wordpress.org/plugins/cache-enabler/
     187        if ( class_exists( 'Cache_Enabler' ) && method_exists( 'Cache_Enabler', 'clear_site_cache' ) ) {
     188            Cache_Enabler::clear_site_cache();
     189        }
     190
     191        // SG Optimizer Plugin - https://wordpress.org/plugins/sg-cachepress/
     192        if ( class_exists( '\\SiteGround_Optimizer\\Supercacher\\Supercacher' ) && method_exists( '\\SiteGround_Optimizer\\Supercacher\\Supercacher', 'purge_cache' ) ) {
     193            \SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
     194        }
     195
     196        // LiteSpeed Cache Plugin - https://wordpress.org/plugins/litespeed-cache/
     197        if ( class_exists( '\\LiteSpeed\\Purge' ) && method_exists( '\\LiteSpeed\\Purge', 'purge_all' ) ) {
     198            \LiteSpeed\Purge::purge_all( 'Purged by Proofratings' );
     199        }
     200
     201        // Nginx Helper Plugin - https://wordpress.org/plugins/nginx-helper/
     202        global $nginx_purger;
     203        if ( is_a( $nginx_purger, 'Purger' ) && method_exists( $nginx_purger, 'purge_all' ) ) {
     204            $nginx_purger->purge_all();
     205        }
     206
     207        // WP Rocket Plugin - https://wp-rocket.me/
     208        if ( function_exists( 'rocket_clean_domain' ) ) {
     209            rocket_clean_domain();
     210        }
    159211    }
    160212
     
    163215     */
    164216    public function get_location_settings(WP_REST_Request $request) {
     217        $this->clear_cache();
    165218        $location = $this->locations->get_by_location($request->get_param('location_id'));
    166219        if ( isset($location->settings) ) {
  • proofratings/trunk/proofratings.php

    r2704756 r2706800  
    44 * Plugin URI: https://proofratings.com
    55 * Description: Proofratings monitors all your third party sites for reviews by your customers. Sharing review ratings badges on your website increases conversions.
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Author: Proofratings
    88 * Requires at least: 5.2
     
    2121
    2222// Define constants.
    23 define( 'PROOFRATINGS_VERSION', '1.1.1' );
     23define( 'PROOFRATINGS_VERSION', '1.1.2' );
    2424define( 'PROOFRATINGS_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
    2525define( 'PROOFRATINGS_PLUGIN_URL', untrailingslashit(plugin_dir_url(__FILE__)));
  • proofratings/trunk/readme.txt

    r2704756 r2706800  
    55Requires at least: 5.2
    66Tested up to: 5.9.2
    7 Stable tag: 1.1.1
     7Stable tag: 1.1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080
    8181== Changelog ==
     82= 1.1.2 =
     83* Fix cache problem
     84
    8285= 1.1.1 =
    8386* Fix minor issue
Note: See TracChangeset for help on using the changeset viewer.