Ticket #15248: allow-accents-in-slugs.php
| File allow-accents-in-slugs.php, 472 bytes (added by , 14 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Allow Accents in Slugs |
| 4 | Plugin URI: http://core.trac.wordpress.org/ticket/15248 |
| 5 | Description: Allows to keep accented characters in post and term slugs. |
| 6 | Author: Sergey Biryukov |
| 7 | Author URI: http://profiles.wordpress.org/sergeybiryukov/ |
| 8 | Version: 0.1 |
| 9 | */ |
| 10 | |
| 11 | function aas_restore_raw_title($title, $raw_title, $context) { |
| 12 | return ( $context == 'save' ) ? $raw_title : $title; |
| 13 | } |
| 14 | add_filter('sanitize_title', 'aas_restore_raw_title', 9, 3); |
| 15 | ?> |