Plugin Directory

Changeset 3313932


Ignore:
Timestamp:
06/18/2025 02:17:33 PM (7 months ago)
Author:
boldgrid
Message:

Release 2.8.10, see readme.txt for the changelog.

Location:
w3-total-cache/tags/2.8.10
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • w3-total-cache/tags/2.8.10/Cdn_Plugin.php

    r3294392 r3313932  
    7373        }
    7474
     75        add_action( 'send_headers', array( $this, 'send_headers' ) );
     76
    7577        $default_override = Cdn_Util::get_flush_manually_default_override( $cdn_engine );
    7678        $flush_on_actions = ! $this->_config->get_boolean( 'cdn.flush_manually', $default_override );
     
    102104
    103105        add_filter( 'w3tc_minify_http2_preload_url', array( $this, 'w3tc_minify_http2_preload_url' ), 3000 );
     106    }
     107
     108    /**
     109     * Send CDN Headers.
     110     *
     111     * @return void
     112     *
     113     * @since 2.8.10
     114     */
     115    public function send_headers() {
     116        $cdn_engine     = $this->_config->get_string( 'cdn.engine' );
     117        $is_cdn_enabled = $this->_config->get_boolean( 'cdn.enabled' );
     118
     119        if ( $is_cdn_enabled && $cdn_engine ) {
     120            @header( 'X-W3TC-CDN: ' . $cdn_engine );
     121        }
    104122    }
    105123
  • w3-total-cache/tags/2.8.10/Generic_Plugin_Admin.php

    r3272823 r3313932  
    12371237                    '<tr>' .
    12381238                        '<td>' . esc_html__( 'or use FTP form to allow ', 'w3-total-cache' ) .
    1239                             '<strong>' . esc_html__( 'W3 Total Cache', 'w3-total-cache' ) . '</strong>' .
     1239                            '<strong>' . esc_html__( 'W3 Total Cache', 'w3-total-cache' ) . '</strong> ' .
    12401240                            esc_html__( 'make it automatically.', 'w3-total-cache' ) .
    12411241                        '</td>' .
  • w3-total-cache/tags/2.8.10/Root_AdminActivation.php

    r3272823 r3313932  
    6262        }
    6363
    64         try {
    65             $e      = Dispatcher::component( 'Root_Environment' );
    66             $config = Dispatcher::config();
     64        $e      = Dispatcher::component( 'Root_Environment' );
     65        $config = Dispatcher::config();
     66        $debug  = \defined( 'WP_DEBUG' ) && WP_DEBUG && ! \defined( 'W3D_TESTING' );
     67
     68        try {
    6769            $e->fix_in_wpadmin( $config, true );
     70        } catch ( Util_Environment_Exceptions $exs ) {
     71            $r = Util_Activation::parse_environment_exceptions( $exs );
     72
     73            if ( \strlen( $r['required_changes'] ) > 0 ) {
     74                // Log the error for debugging purposes.
     75                if ( $debug ) {
     76                    \error_log( 'W3 Total Cache environment exception: ' . $r['required_changes'] ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     77                }
     78            }
     79        } catch ( \Exception $e ) {
     80            // Log the exception for debugging purposes.
     81            if ( $debug ) {
     82                \error_log( 'W3 Total Cache exception: ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     83            }
     84
     85            // Handle the exception gracefully.
     86            Util_Activation::error_on_exception( $e );
     87        }
     88
     89        try {
    6890            $e->fix_on_event( $config, 'activate' );
    69 
    70             // try to save config file if needed, optional thing so exceptions hidden.
    71             if ( ! ConfigUtil::is_item_exists( 0, false ) ) {
    72                 try {
    73                     // create folders.
    74                     $e->fix_in_wpadmin( $config );
    75                 } catch ( \Exception $ex ) {
    76                     // missing exception handle?
    77                 }
    78 
    79                 try {
    80                     Util_Admin::config_save( Dispatcher::config(), $config );
    81                 } catch ( \Exception $ex ) {
    82                     // missing exception handle?
    83                 }
    84             }
    85 
    86             if ( ! get_option( 'w3tc_install_date' ) ) {
    87                 update_option( 'w3tc_install_date', current_time( 'mysql' ) );
    88             }
    89         } catch ( Util_Environment_Exceptions $e ) {
    90             // missing exception handle?
     91        } catch ( Util_Environment_Exceptions $exs ) {
     92            $r = Util_Activation::parse_environment_exceptions( $exs );
     93
     94            if ( \strlen( $r['required_changes'] ) > 0 ) {
     95                // Log the error for debugging purposes.
     96                if ( $debug ) {
     97                    \error_log( 'W3 Total Cache environment exception: ' . $r['required_changes'] ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     98                }
     99            }
    91100        } catch ( \Exception $e ) {
     101            // Log the exception for debugging purposes.
     102            if ( $debug ) {
     103                \error_log( 'W3 Total Cache exception: ' . $e->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     104            }
     105
     106            // Handle the exception gracefully.
    92107            Util_Activation::error_on_exception( $e );
     108        }
     109
     110        // try to save config file if needed, optional thing so exceptions hidden.
     111        if ( ! ConfigUtil::is_item_exists( 0, false ) ) {
     112            try {
     113                // create folders.
     114                $e->fix_in_wpadmin( $config );
     115            } catch ( Util_Environment_Exceptions $exs ) {
     116                $r = Util_Activation::parse_environment_exceptions( $exs );
     117
     118                if ( \strlen( $r['required_changes'] ) > 0 ) {
     119                    // Log the error for debugging purposes.
     120                    if ( $debug ) {
     121                        \error_log( 'W3 Total Cache environment exception: ' . $r['required_changes'] ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     122                    }
     123                }
     124            }
     125
     126            try {
     127                Util_Admin::config_save( Dispatcher::config(), $config );
     128            } catch ( \Exception $ex ) {
     129                // Log the exception for debugging purposes.
     130                if ( $debug ) {
     131                    \error_log( 'W3 Total Cache exception: ' . $ex->getMessage() ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
     132                }
     133            }
     134        }
     135
     136        // Set the installation date if it is not already set.
     137        if ( ! get_option( 'w3tc_install_date' ) ) {
     138            update_option( 'w3tc_install_date', current_time( 'mysql' ) );
    93139        }
    94140    }
  • w3-total-cache/tags/2.8.10/UserExperience_Emoji_Extension.php

    r3272823 r3313932  
    7878        return array_filter(
    7979            $urls,
    80             function ( $v ) {
    81                 return ( 'https://s.w.org/' !== substr( $v, 0, 16 ) );
     80            function ( $hint ) {
     81                // Handle the case where each hint is an array with 'href' key.
     82                if ( is_array( $hint ) && isset( $hint['href'] ) ) {
     83                    return strpos( $hint['href'], '//s.w.org' ) === false;
     84                }
     85
     86                // Handle the case where hint is a simple string URL.
     87                if ( is_string( $hint ) ) {
     88                    return strpos( $hint, '//s.w.org' ) === false;
     89                }
     90
     91                // In any other case, keep the item.
     92                return true;
    8293            }
    8394        );
  • w3-total-cache/tags/2.8.10/languages/w3-total-cache.pot

    r3294392 r3313932  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: W3 Total Cache 2.8.9\n"
     5"Project-Id-Version: W3 Total Cache 2.8.10\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/w3-total-cache\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-05-15T20:07:07+00:00\n"
     12"POT-Creation-Date: 2025-06-18T14:16:42+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    28372837
    28382838#. translators: 1 queue interval value.
    2839 #: Cdn_Plugin.php:284
     2839#: Cdn_Plugin.php:302
    28402840#, php-format
    28412841msgid "[W3TC] CDN queue process (every %1$d seconds)"
     
    28432843
    28442844#. translators: 1 queue interval value.
    2845 #: Cdn_Plugin.php:302
     2845#: Cdn_Plugin.php:320
    28462846#, php-format
    28472847msgid "[W3TC] CDN auto upload (every %1$d seconds)"
    28482848msgstr ""
    28492849
    2850 #: Cdn_Plugin.php:557
     2850#: Cdn_Plugin.php:575
    28512851#: DbCache_WpdbInjection_QueryCaching.php:869
    28522852msgid "wp-admin"
    28532853msgstr ""
    28542854
    2855 #: Cdn_Plugin.php:564
     2855#: Cdn_Plugin.php:582
    28562856#: DbCache_WpdbInjection_QueryCaching.php:871
    28572857msgid "Short init"
    28582858msgstr ""
    28592859
    2860 #: Cdn_Plugin.php:571
     2860#: Cdn_Plugin.php:589
    28612861msgid "user agent is rejected"
    28622862msgstr ""
    28632863
    2864 #: Cdn_Plugin.php:578
     2864#: Cdn_Plugin.php:596
    28652865msgid "request URI is rejected"
    28662866msgstr ""
    28672867
    2868 #: Cdn_Plugin.php:585
     2868#: Cdn_Plugin.php:603
    28692869msgid "SSL is rejected"
    28702870msgstr ""
    28712871
    2872 #: Cdn_Plugin.php:605
     2872#: Cdn_Plugin.php:623
    28732873msgid "DONOTCDN constant is defined"
    28742874msgstr ""
    28752875
    2876 #: Cdn_Plugin.php:612
     2876#: Cdn_Plugin.php:630
    28772877#: Extension_NewRelic_Plugin.php:199
    28782878msgid "logged in role is rejected"
    28792879msgstr ""
    28802880
    2881 #: Cdn_Plugin.php:840
     2881#: Cdn_Plugin.php:858
    28822882msgid "CDN Cache"
    28832883msgstr ""
    28842884
    2885 #: Cdn_Plugin.php:849
     2885#: Cdn_Plugin.php:867
    28862886msgid "CDN: Manual Purge"
    28872887msgstr ""
    28882888
    28892889#. translators: 1 CDN engine name, 2 rejection reason.
    2890 #: Cdn_Plugin.php:874
     2890#: Cdn_Plugin.php:892
    28912891#, php-format
    28922892msgid "Content Delivery Network via %1$s%2$s"
    28932893msgstr ""
    28942894
    2895 #: Cdn_Plugin.php:903
     2895#: Cdn_Plugin.php:921
    28962896msgid "Replaced URLs for CDN:"
    28972897msgstr ""
    28982898
    2899 #: Cdn_Plugin.php:1118
     2899#: Cdn_Plugin.php:1136
    29002900msgid "Cant find minification base url, make sure minification folder sits inside WP_CONTENT_DIR and DOCUMENT_ROOT is set correctly"
    29012901msgstr ""
     
    1292912929
    1293012930#. translators: 8 closing HTML p tag followed by closing HTML div tag.
    12931 #: Root_AdminActivation.php:126
     12931#: Root_AdminActivation.php:172
    1293212932#, php-format
    1293312933msgid "%1$s%2$sW3 Total Cache Error:%3$s Files and directories could not be automatically removed to complete the deactivation. %4$sPlease execute commands manually:%5$s%6$s%7$s%8$s"
    1293412934msgstr ""
    1293512935
    12936 #: Root_AdminActivation.php:130
     12936#: Root_AdminActivation.php:176
    1293712937msgid "error"
    1293812938msgstr ""
  • w3-total-cache/tags/2.8.10/readme.txt

    r3294392 r3313932  
    44Requires at least: 5.3
    55Tested up to: 6.8
    6 Stable tag: 2.8.9
     6Stable tag: 2.8.10
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    362362
    363363== Changelog ==
     364
     365= 2.8.10 =
     366* Fix: Exception handling on activation
     367* Fix: wp_resource_hint handling for arrays
     368* Enhancement: Added X-W3TC-CDN header
    364369
    365370= 2.8.9 =
  • w3-total-cache/tags/2.8.10/vendor/composer/installed.php

    r3294392 r3313932  
    22    'root' => array(
    33        'name' => 'boldgrid/w3-total-cache',
    4         'pretty_version' => '2.8.9',
    5         'version' => '2.8.9.0',
    6         'reference' => 'bc2d18d140d332b1c748977d5b4309c7c2d8b46e',
     4        'pretty_version' => '2.8.10',
     5        'version' => '2.8.10.0',
     6        'reference' => 'ab49390afa5a26400ec9214f92fa68c472fb2424',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    3939        ),
    4040        'boldgrid/w3-total-cache' => array(
    41             'pretty_version' => '2.8.9',
    42             'version' => '2.8.9.0',
    43             'reference' => 'bc2d18d140d332b1c748977d5b4309c7c2d8b46e',
     41            'pretty_version' => '2.8.10',
     42            'version' => '2.8.10.0',
     43            'reference' => 'ab49390afa5a26400ec9214f92fa68c472fb2424',
    4444            'type' => 'wordpress-plugin',
    4545            'install_path' => __DIR__ . '/../../',
  • w3-total-cache/tags/2.8.10/w3-total-cache-api.php

    r3294392 r3313932  
    1111
    1212define( 'W3TC', true );
    13 define( 'W3TC_VERSION', '2.8.9' );
     13define( 'W3TC_VERSION', '2.8.10' );
    1414define( 'W3TC_POWERED_BY', 'W3 Total Cache' );
    1515define( 'W3TC_EMAIL', 'w3tc@w3-edge.com' );
  • w3-total-cache/tags/2.8.10/w3-total-cache.php

    r3294392 r3313932  
    44 * Plugin URI:        https://www.boldgrid.com/totalcache/
    55 * Description:       The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
    6  * Version:           2.8.9
     6 * Version:           2.8.10
    77 * Requires at least: 5.3
    88 * Requires PHP:      7.2.5
Note: See TracChangeset for help on using the changeset viewer.