pruebas
This commit is contained in:
@@ -144,8 +144,30 @@ function rocket_load_textdomain() {
|
||||
load_textdomain( 'rocket', WP_LANG_DIR . '/plugins/wp-rocket-' . $locale . '.mo' );
|
||||
|
||||
load_plugin_textdomain( 'rocket', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
||||
|
||||
// WP 6.7 warns if the rocket domain is translated before after_setup_theme.
|
||||
// Hold an empty catalog until then so boot-time strings do not trigger JIT loading.
|
||||
if ( ! is_textdomain_loaded( 'rocket' ) ) {
|
||||
global $l10n;
|
||||
|
||||
$l10n['rocket'] = new NOOP_Translations();
|
||||
}
|
||||
}
|
||||
add_action( 'plugins_loaded', 'rocket_load_textdomain' );
|
||||
|
||||
/**
|
||||
* Drops the temporary catalog so later requests can load the real translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function rocket_release_early_textdomain() {
|
||||
global $l10n;
|
||||
|
||||
if ( isset( $l10n['rocket'] ) && $l10n['rocket'] instanceof NOOP_Translations ) {
|
||||
unset( $l10n['rocket'] );
|
||||
}
|
||||
}
|
||||
add_action( 'plugins_loaded', 'rocket_load_textdomain', 1 );
|
||||
add_action( 'after_setup_theme', 'rocket_release_early_textdomain', 0 );
|
||||
|
||||
$wp_rocket_requirement_checks = new WP_Rocket_Requirements_Check(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user