Last active
October 8, 2021 04:14
-
-
Save hamidrezayazdani/ac083d1068c6ccfdf0c211b1bc2d8e61 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 | |
function wpp_replace_arabic_chars_in_search_term( $request_vars ) { | |
if ( function_exists( 'fix_arabic' ) && ! empty( $request_vars['s'] ) ) { | |
$request_vars['s'] = fix_arabic( $request_vars['s'] ); | |
} | |
return $request_vars; | |
} | |
add_filter( 'request', 'wpp_replace_arabic_chars_in_search_term' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment