Plugin Directory

Changeset 3477320


Ignore:
Timestamp:
03/08/2026 08:32:54 AM (3 weeks ago)
Author:
rocketcomunicazione
Message:

2.4.0

Location:
rc-site-manager-optimization/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • rc-site-manager-optimization/trunk/assets/scripts/script.js

    r3476531 r3477320  
    11781178    const icon = icons[type] || 'info';
    11791179
    1180     const $container = jQuery('.rc_sm_notice_fly');
     1180    //const $container = jQuery('.rc_sm_notice_fly'); modificato 07/03/2026
     1181    const $container = jQuery('.rc_sm_notice_fly').first();
    11811182    if (!$container.length) return;
    11821183
     
    11901191    $container.prepend($notice);
    11911192
     1193    //Modificato 07/03/2026
     1194    //setTimeout(() => {
     1195    //    $notice.fadeOut(400, function () {
     1196    //        jQuery(this).remove();
     1197    //    });
     1198    //}, duration);
     1199
    11921200    setTimeout(() => {
    1193         $notice.fadeOut(400, function () {
     1201        $notice.css('animation', 'none');
     1202        $notice.fadeOut(5000, function () {
    11941203            jQuery(this).remove();
    11951204        });
    1196     }, duration);
     1205}, duration);
    11971206}
    11981207
  • rc-site-manager-optimization/trunk/includes/admin.php

    r3476219 r3477320  
    416416    $td = 'rc-site-manager-optimization';
    417417
    418     $table   = esc_sql($wpdb->prefix . 'wpr_rucss_used_css');
    419     $records = $wpdb->get_results("SELECT id, url, is_mobile FROM {$table}");
    420 
    421418    if ( defined('WP_ROCKET_VERSION') ) {
    422419        rocket_clean_domain();
    423420    }
    424421
    425     $success_count = 0;
    426 
    427     if ( ! empty($records) ) {
    428         $wpdb->query("TRUNCATE TABLE {$table}");
    429 
    430         foreach ( $records as $row ) {
    431             $user_agent = ($row->is_mobile === '1')
    432                 ? 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15A372 Safari/604.1'
    433                 : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.0.0 Safari/537.36';
    434 
    435             usleep(100000);
    436 
    437             wp_remote_get(esc_url_raw($row->url), [
    438                 'timeout'   => 30,
    439                 'blocking'  => false,
    440                 'sslverify' => false,
    441                 'headers'   => ['User-Agent' => $user_agent],
    442             ]);
    443 
    444             $success_count++;
    445         }
    446     }
    447 
    448     if ( $success_count > 0 ) {
    449         $msg = sprintf(__('Cache cleared and regenerated. <br>%s records (Desktop and Mobile).', $td), $success_count);
    450     } else {
    451         $msg = __('Domain cache cleared.', $td);
    452     }
    453 
    454     wp_send_json_success(['msg' => $msg]);
     422    $table = esc_sql($wpdb->prefix . 'wpr_rucss_used_css');
     423    $wpdb->query("TRUNCATE TABLE {$table}");
     424
     425    // Rigenera solo la homepage (desktop + mobile)
     426    $home_url = rtrim(home_url(), '/');
     427
     428    foreach ([
     429        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.0.0 Safari/537.36',
     430        'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15A372 Safari/604.1',
     431    ] as $ua ) {
     432        wp_remote_get($home_url, [
     433            'timeout'   => 30,
     434            'blocking'  => false,
     435            'sslverify' => false,
     436            'headers'   => ['User-Agent' => $ua],
     437        ]);
     438    }
     439
     440    wp_send_json_success(['msg' => __('Cache cleared. <br>Homepage regeneration started.', $td)]);
    455441});
  • rc-site-manager-optimization/trunk/rc-site-manager-optimization.php

    r3476531 r3477320  
    33 * Plugin Name: RC Site Manager & Optimization
    44 * Description: All-in-one Wordpress manager: control WooCommerce, SEO, caching, media, and multilingual tools from one dashboard.
    5  * Version: 2.3.9
     5 * Version: 2.4.0
    66 * Author: Rocket Comunicazione
    77 * Author URI: https://www.rocketcomunicazione.com
     
    1818
    1919
    20 define('RC_SM_PLUGIN_VERSION', '2.3.9');
     20define('RC_SM_PLUGIN_VERSION', '2.4.0');
    2121
    2222define( 'RC_SM_SITE_URL', home_url() );
  • rc-site-manager-optimization/trunk/readme.txt

    r3476531 r3477320  
    55Tested up to: 6.9
    66Requires PHP: 8.1
    7 Stable tag: 2.3.9
     7Stable tag: 2.4.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    160160== Changelog ==
    161161
     162
     163= 2.4.0 - March 8, 2026 =
     164* Minor bug fixes and improvement
    162165
    163166= 2.3.9 - March 6, 2026 =
     
    295298== Upgrade Notice ==
    296299
     300= 2.4.0 - March 8, 2026 =
     301Minor bug fixes.
     302
    297303= 2.3.9 - March 6, 2026 =
    298304Minor bug fixes.
Note: See TracChangeset for help on using the changeset viewer.