[wp-trac] [WordPress Trac] #57592: Hebrew sort problem come from a core
WordPress Trac
noreply at wordpress.org
Tue Jan 31 16:44:50 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 | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Old description:
> 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;
> }
New description:
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;
}
}}}
--
Comment (by SergeyBiryukov):
Hi there, welcome to WordPress Trac! Thanks for the report.
Could you share the steps to reproduce the issue on a clean install?
It's not quite clear to me whether this is about post slugs or term slugs,
and what the expected results should be.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57592#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list