Ticket #18306: 18306.diff
File 18306.diff, 3.5 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/post.php
1165 1165 } 1166 1166 1167 1167 if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { 1168 if ( isset($view_post) ) 1169 $permalink = "<a href='$permalink' title='$view_post' target='_blank'>$permalink</a>"; 1170 1168 1171 $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n"; 1169 1172 if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) 1170 1173 $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; 1171 if ( isset($view_post) )1172 $return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n";1173 1174 1174 1175 $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); 1175 1176 … … 1190 1191 } 1191 1192 } 1192 1193 1193 $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';1194 $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>'; 1194 1195 $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); 1195 1196 $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); 1197 if ( isset($view_post) ) 1198 $display_link = "<a href='$view_link' title='$view_post' target='_blank'>$display_link</a>"; 1199 1196 1200 $return = '<strong>' . __('Permalink:') . "</strong>\n"; 1197 1201 $return .= '<span id="sample-permalink">' . $display_link . "</span>\n"; 1198 1202 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1199 1203 $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n"; 1200 1204 $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n"; 1201 if ( isset($view_post) )1202 $return .= "<span id='view-post-btn'><a href='$view_link' class='button' target='_blank'>$view_post</a></span>\n";1203 1204 1205 $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); 1205 1206 1206 1207 return $return; -
wp-admin/js/post.dev.js
1 var tagBox, commentsBox, editPermalink, makeSlugeditClickable,WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint;1 var tagBox, commentsBox, editPermalink, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint; 2 2 3 3 // return an array with any duplicate, whitespace or values removed 4 4 function array_unique_noempty(a) { … … 591 591 real_slug.val(this.value); 592 592 }).focus(); 593 593 } 594 595 makeSlugeditClickable = function() {596 $('#editable-post-name').click(function() {597 $('#edit-slug-buttons').children('.edit-slug').click();598 });599 }600 makeSlugeditClickable();601 594 } 602 595 603 596 // word count -
wp-admin/css/wp-admin.dev.css
2270 2270 padding: 0 7px; 2271 2271 } 2272 2272 2273 #editable-post-name { 2274 text-decoration: underline; 2275 } 2276 2273 2277 #editable-post-name-full { 2274 2278 display: none; 2275 2279 }