[wp-trac] [WordPress Trac] #57592: Hebrew sort problem come from a core
WordPress Trac
noreply at wordpress.org
Tue Jan 31 16:33:57 UTC 2023
#57592: Hebrew sort problem come from a core
--------------------------+-----------------------------
Reporter: leonfaiberg | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
when a slug on Hebrew the sort in admin its not work and we are find a
solution for this
this one when you add this to the core the sort is start work א-ת
/ Rewrite WP Core sanitize key (hebrew support)
add_filter('sanitize_key', 'hebrew_sanitize_key', 10, 2);
function hebrew_sanitize_key($key, $rawkey) {
$sanitized_key = '';
if (is_scalar($key)) {
$sanitized_key = strtolower($rawkey);
$sanitized_key = preg_replace('/[^א-תa-z0-9_\-]/', '',
$sanitized_key);
}
return $sanitized_key;
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57592>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list