Ashkan
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [Permalink Manager Lite] Incompatibility with Slug Translator FrameworkHello
All settings are done correctly.
URLs are not translated when I enable the plugin
https://s6.uupload.ir/files/permalink_manager_settings_7itq.pngHello Brother
Sorry to bother you
Unfortunately, the code for converting Persian numbers to English did not work for the postal addressConvert Persian/Arabic Numbers To English Numbers
function replace_words($string) { $persian = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?']; $arabic = ['?', '?', '?', '?', '?', '?', '?', '?', '?','?']; $num = range(0, 9); $convertedPersianNums = str_replace($persian, $num, $string); $englishNumbersOnly = str_replace($arabic, $num, $convertedPersianNums); return $englishNumbersOnly; } add_filter('the_content', 'replace_words'); add_filter('the_excerpt', 'replace_words'); add_filter('the_title', 'replace_words'); add_filter('wpseo_title', 'replace_words');
Thank you very much, the problem is solved. Please help me solve this problem as well function replace_words($string) { $persian = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?']; $arabic = ['?', '?', '?', '?', '?', '?', '?', '?', '?', '?']; $num = range(0, 9); $convertedPersianNums = str_replace($persian, $num, $string); $englishNumbersOnly = str_replace($arabic, $num, $convertedPersianNums); return $englishNumbersOnly; }
https://s4.uupload.ir/files/tra_66ey.jpg
- This reply was modified 3 years, 1 month ago by Ashkan.
Hello, thank you
The code you entered does not work
https://s4.uupload.ir/files/tra_g746.jpgFinal code
function add_to_page_titles($title) { $title = str_replace("\xE2\x80\x8C", " ", $title); return $title; } add_filter('the_content', 'add_to_page_titles'); add_filter('the_excerpt', 'add_to_page_titles'); add_filter('the_title', 'add_to_page_titles'); add_filter('wpseo_title', 'add_to_page_titles'); add_filter('sanitize_title', 'add_to_page_titles'); function pm_filter_default_post_uris($default_uri, $native_slug, $post, $slug, $native_uri) { $default_uri = str_replace("\xE2\x80\x8C", "-", $default_uri); return trim($default_uri, "/"); } add_filter('permalink_manager_filter_default_post_uri', 'pm_filter_default_post_uris', 10, 5);
Please provide a code to support the Zero Width Non -joiner character and remove it from the address
https://www.utf8-chartable.de/unicode-utf8-table.pl?start=8192&number=128&utf8=string-literal
Viewing 4 replies - 1 through 4 (of 4 total)