| @@ -1,9 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: xSpeed Cache |
| 4 | 4 | * Description: Minimal, ultra-fast caching plugin for WordPress. |
| 5 | - * Version: 1.2.4 | |
| 5 | + * Version: 1.3.3 | |
| 6 | 6 | * Requires at least: 6.0 |
| 7 | 7 | * Tested up to: 7.1 |
| 8 | 8 | * Requires PHP: 7.4 |
| 9 | 9 | * Author: WPDeveloper |
| @@ -10,8 +10,9 @@ | ||
| 10 | 10 | * Author URI: https://wpdeveloper.com |
| 11 | 11 | * License: GPLv2 or later |
| 12 | 12 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 13 | 13 | * Text Domain: xspeed |
| 14 | + * Domain Path: /languages | |
| 14 | 15 | * |
| 15 | 16 | * @package XSpeed |
| 16 | 17 | */ |
| 17 | 18 | |
| @@ -18,9 +19,9 @@ | ||
| 18 | 19 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | 20 | exit; |
| 20 | 21 | } |
| 21 | 22 | |
| 22 | -define( 'XSPEED_VERSION', '1.2.4' ); | |
| 23 | +define( 'XSPEED_VERSION', '1.3.3' ); | |
| 23 | 24 | define( 'XSPEED_FILE', __FILE__ ); |
| 24 | 25 | define( 'XSPEED_DIR', plugin_dir_path( __FILE__ ) ); |
| 25 | 26 | define( 'XSPEED_URL', plugin_dir_url( __FILE__ ) ); |
| 26 | 27 | define( 'XSPEED_CACHE_DIR', WP_CONTENT_DIR . '/cache/xspeed' ); |
| @@ -275,8 +276,19 @@ | ||
| 275 | 276 | |
| 276 | 277 | add_action( |
| 277 | 278 | 'plugins_loaded', |
| 278 | 279 | function () { |
| 280 | + /* | |
| 281 | + * Register the text domain before anything else in this closure. | |
| 282 | + * Nothing loads it implicitly, and translation plugins such as Loco | |
| 283 | + * hook `load_textdomain_mofile` -- that filter only fires in response | |
| 284 | + * to an actual load call, so without this every .mo on disk is | |
| 285 | + * silently ignored. This has to run on `plugins_loaded` or later or | |
| 286 | + * WordPress trips its own _doing_it_wrong guard, and it has to come | |
| 287 | + * before the integrity check below, whose notice is translatable too. | |
| 288 | + */ | |
| 289 | + load_plugin_textdomain( 'xspeed', false, dirname( plugin_basename( XSPEED_FILE ) ) . '/languages' ); | |
| 290 | + | |
| 279 | 291 | $missing = xspeed_missing_core_classes(); |
| 280 | 292 | if ( ! empty( $missing ) ) { |
| 281 | 293 | add_action( |
| 282 | 294 | 'admin_notices', |