mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Use full slug, not abbreviated slug, when editing. Props nbachiyski. fixes #5816
git-svn-id: https://develop.svn.wordpress.org/trunk@6794 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -555,11 +555,13 @@ function get_sample_permalink_html($id, $new_slug=null) {
|
||||
if (false === strpos($permalink, '%postname%')) {
|
||||
return '';
|
||||
}
|
||||
$title = __('You can edit this part of the permalink using the Edit button on the right');
|
||||
$title = __('Click to edit this part of the permalink');
|
||||
if (strlen($post_name) > 30) {
|
||||
$post_name = substr($post_name, 0, 14). '…' . substr($post_name, -14);
|
||||
$post_name_abridged = substr($post_name, 0, 14). '…' . substr($post_name, -14);
|
||||
} else {
|
||||
$post_name_abridged = $post_name;
|
||||
}
|
||||
$post_name_html = '<span id="editable-post-name" title="'.$title.'">'.$post_name.'</span>';
|
||||
$post_name_html = '<span id="editable-post-name" title="'.$title.'">'.$post_name_abridged.'</span><span id="editable-post-name-full">'.$post_name.'</span>';
|
||||
$display_link = str_replace('%postname%', $post_name_html, $permalink);
|
||||
return $display_link;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user