Skip to content
Snippets Groups Projects
Commit e7fd33fc authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

bugfix(load_plugin_textdomain): revert WP 6.7 changes

parent 2fa46a64
No related branches found
No related tags found
1 merge request!10bugfix(load_plugin_textdomain): revert WP 6.7 changes
Pipeline #440619 passed with stages
in 35 seconds
## [1.2.3] - 2024-11-09
### Fixed
- Hide doing it wrong notice on production environment
## [1.2.2] - 2024-11-09
### Fixed
- Reverted: WordPress 6.7 compatibility: loading text domain
......
......@@ -153,6 +153,13 @@ final class PluginBootstrap {
if ( method_exists( $plugin_info, 'get_language_dir' ) ) {
$lang_dir = $plugin_info->get_language_dir();
}
$text_domain = $plugin_info->get_text_domain();
add_filter( 'doing_it_wrong_trigger_error', function( $doing_it_wrong, $function, $message, $version ) use ( $text_domain ) {
if ( wp_get_environment_type() === 'production' && $function === '_load_textdomain_just_in_time' && strpos( $message, '<code>' . $text_domain . '</code>' ) !== false ) {
return false;
}
return $doing_it_wrong;
}, 10, 4 );
\load_plugin_textdomain(
$plugin_info->get_text_domain(),
false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment