diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 33b4e33115..8f62e3a993 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -31,7 +31,7 @@ if ( ! empty($cat_ID) ) { </tr> <tr class="form-field"> <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th> - <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape($category->slug); ?>" size="40" /><br /> + <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br /> <?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td> </tr> <tr class="form-field"> diff --git a/wp-admin/edit-link-category-form.php b/wp-admin/edit-link-category-form.php index e0d8f4c089..81a686be4b 100644 --- a/wp-admin/edit-link-category-form.php +++ b/wp-admin/edit-link-category-form.php @@ -30,7 +30,7 @@ if ( ! empty($cat_ID) ) { </tr> <tr class="form-field"> <th scope="row" valign="top"><label for="slug"><?php _e('Category slug') ?></label></th> - <td><input name="slug" id="slug" type="text" value="<?php echo $category->slug; ?>" size="40" /> + <td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" /> <?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td> </tr> <tr class="form-field"> diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index ad9bc23061..de0f6c8f77 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -31,7 +31,7 @@ if ( ! empty($tag_ID) ) { </tr> <tr class="form-field"> <th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th> - <td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape($tag->slug); ?>" size="40" /> + <td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" /> <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td> </tr> </table> diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 99542fa8cf..8cd3c9e036 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -627,7 +627,7 @@ function get_sample_permalink($id, $title=null, $name = null) { $permalink = str_replace('%pagename%', "${uri}%pagename%", $permalink); } - $permalink = array($permalink, $post->post_name); + $permalink = array($permalink, apply_filters('editable_slug', $post->post_name)); $post->post_status = $original_status; $post->post_date = $original_date; $post->post_name = $original_name;