Forked from kowsar89/disable-wp-textdomain-error.php
Created
December 9, 2024 08:56
-
-
Save jamesmorrison/6a908f05092511638561d26d715b94ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Disable Textdomain Error | |
* Description: Prevents triggering errors for the '_load_textdomain_just_in_time' function. | |
* Author: Kowsar Hossain | |
* Version: 1.0 | |
* | |
* Note: This is a Must-Use (MU) plugin. Place this file in the 'wp-content/mu-plugins' directory. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
add_filter( 'doing_it_wrong_trigger_error', function( $status, $function_name ) { | |
if ( '_load_textdomain_just_in_time' === $function_name ) { | |
return false; | |
} | |
return $status; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment