Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#57592 new defect (bug)

Hebrew sort problem come from a core

Reported by: leonfaiberg Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version:
Severity: normal Keywords:
Cc: Focuses:

Description (last modified by SergeyBiryukov)

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;
} 

Change History (1)

#1 @SergeyBiryukov
4 years ago

  • Description modified (diff)

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.

Note: See TracTickets for help on using tickets.