سلام
کدی که من نوشتم و جواب گرفتم این هست:
$url = $_SERVER['REQUEST_URI'];
// checking if we are not in home page
if($url != '/'){
// getting language from url
$lang = $url[1] . $url[2];
// excluding the persian language
if( $lang != 'fa' ) {
add_filter( 'option_active_plugins', function( $plugins ) {
// disable the jalali date plugin or whatever...
$not_allowed = array( 'wp-shamsi/wp-shamsi.php' );
return array_values( array_diff( $plugins, $not_allowed ) );
});
}
}