WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#15248 closed enhancement (duplicate)

remove_accents filter need

Reported by: unsalkorkmaz Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Charset Keywords:
Focuses: Cc:

Description

Hi,

http://core.trac.wordpress.org/ticket/9591
http://core.trac.wordpress.org/ticket/10249#comment:36
http://wordpress.org/extend/ideas/topic/non-latin-characters-need-love

After those, i think i found my solution but this solution need to edit core;

unset($chars[chr(196).chr(158)]); // 'Ğ'
unset($chars[chr(196).chr(159)]); // 'ğ'
unset($chars[chr(196).chr(176)]); // 'İ'
unset($chars[chr(196).chr(177)]); // 'ı'
unset($chars[chr(195).chr(135)]); // 'Ç'
unset($chars[chr(195).chr(167)]); // 'ç'
unset($chars[chr(197).chr(158)]); // 'Ş'
unset($chars[chr(197).chr(159)]); // 'ş'
unset($chars[chr(195).chr(188)]); // 'ü'
unset($chars[chr(195).chr(156)]); // 'Ü'
unset($chars[chr(195).chr(182)]); // 'ö'
unset($chars[chr(195).chr(150)]); // 'Ö'

Need a filter before formatting.php line 654:

$string = strtr($string, $chars);

Basically i want to use "şŞ İı Ğğ Üü Öö çÇ" chars in permalinks / slugs and this change at least give me an option.
You can read about accents important in http://searchenginewatch.com/3635055 example.

(Sorry for my english and php knowledge)

Attachments (2)

allow-accents-in-slugs.php (472 bytes) - added by SergeyBiryukov 8 years ago.
Allows to keep accented characters in post and term slugs.
allow-turkish-accents-in-slugs.php (7.8 KB) - added by SergeyBiryukov 8 years ago.
Allows to keep accented Turkish characters in post and term slugs, as well as in usernames.

Download all attachments as: .zip

Change History (6)

#1 @unsalkorkmaz
8 years ago

Btw this change allow me to let my users use "şŞ İı Ğğ Üü Öö çÇ" in usernames which i want that too

#2 @nacin
8 years ago

  • Milestone changed from Awaiting Review to Future Release

#3 @hakre
8 years ago

Have a patch at Related: #16905 that makes remove_accents filterable.

#4 in reply to: ↑ description @SergeyBiryukov
8 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Replying to unsalkorkmaz:

Basically i want to use "şŞ İı Ğğ Üü Öö çÇ" chars in permalinks / slugs

You should be able to hook into sanitize_title and use $raw_title for that. See sivel's comment on #16642.

Also, a duplicate of #16905.

@SergeyBiryukov
8 years ago

Allows to keep accented characters in post and term slugs.

@SergeyBiryukov
8 years ago

Allows to keep accented Turkish characters in post and term slugs, as well as in usernames.

Note: See TracTickets for help on using tickets.