diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
index b9eea7f..30588ca 100644
|
|
input#link_url { |
2801 | 2801 | padding: 0 7px; |
2802 | 2802 | } |
2803 | 2803 | |
| 2804 | #sample-permalink a { |
| 2805 | text-decoration: none; |
| 2806 | } |
| 2807 | |
2804 | 2808 | #editable-post-name-full { |
2805 | 2809 | display: none; |
2806 | 2810 | } |
diff --git wp-admin/includes/post.php wp-admin/includes/post.php
index 9098d2f..f39b212 100644
|
|
function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { |
1130 | 1130 | } |
1131 | 1131 | |
1132 | 1132 | if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { |
| 1133 | if ( isset( $view_post ) ) |
| 1134 | $permalink = "<a href='$permalink' title='$view_post' target='_blank'>$permalink</a>"; |
| 1135 | |
1133 | 1136 | $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $permalink . "</span>\n"; |
1134 | 1137 | if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) |
1135 | 1138 | $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button" target="_blank">' . __('Change Permalinks') . "</a></span>\n"; |
1136 | | if ( isset($view_post) ) |
1137 | | $return .= "<span id='view-post-btn'><a href='$permalink' class='button' target='_blank'>$view_post</a></span>\n"; |
1138 | 1139 | |
1139 | 1140 | $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); |
1140 | 1141 | |
… |
… |
function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { |
1155 | 1156 | } |
1156 | 1157 | } |
1157 | 1158 | |
1158 | | $post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>'; |
| 1159 | $post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>'; |
1159 | 1160 | $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); |
1160 | 1161 | $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); |
| 1162 | if ( isset( $view_post ) ) |
| 1163 | $display_link = "<a href='$view_link' title='$view_post' target='_blank'>$display_link</a>"; |
| 1164 | |
1161 | 1165 | $return = '<strong>' . __('Permalink:') . "</strong>\n"; |
1162 | 1166 | $return .= '<span id="sample-permalink">' . $display_link . "</span>\n"; |
1163 | 1167 | $return .= '‎'; // Fix bi-directional text display defect in RTL languages. |
1164 | 1168 | $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"; |
1165 | 1169 | $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n"; |
1166 | | if ( isset($view_post) ) |
1167 | | $return .= "<span id='view-post-btn'><a href='$view_link' class='button' target='_blank'>$view_post</a></span>\n"; |
1168 | | |
1169 | 1170 | $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); |
1170 | 1171 | |
1171 | 1172 | return $return; |
diff --git wp-admin/js/post.dev.js wp-admin/js/post.dev.js
index 51bee06..4884a36 100644
|
|
|
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) { |
… |
… |
jQuery(document).ready( function($) { |
557 | 557 | $('#edit-slug-box').html(data); |
558 | 558 | b.html(revert_b); |
559 | 559 | real_slug.val(new_slug); |
560 | | makeSlugeditClickable(); |
561 | 560 | $('#view-post-btn').show(); |
562 | 561 | }); |
563 | 562 | return false; |
… |
… |
jQuery(document).ready( function($) { |
591 | 590 | real_slug.val(this.value); |
592 | 591 | }).focus(); |
593 | 592 | } |
594 | | |
595 | | makeSlugeditClickable = function() { |
596 | | $('#editable-post-name').click(function() { |
597 | | $('#edit-slug-buttons').children('.edit-slug').click(); |
598 | | }); |
599 | | } |
600 | | makeSlugeditClickable(); |
601 | 593 | } |
602 | 594 | |
603 | 595 | // word count |
diff --git wp-includes/js/autosave.dev.js wp-includes/js/autosave.dev.js
index aa41811..5f2879c 100644
|
|
function autosave_saved_new(response) { |
160 | 160 | |
161 | 161 | function autosave_update_slug(post_id) { |
162 | 162 | // create slug area only if not already there |
163 | | if ( 'undefined' != makeSlugeditClickable && jQuery.isFunction(makeSlugeditClickable) && !jQuery('#edit-slug-box > *').size() ) { |
| 163 | if ( !jQuery('#edit-slug-box > *').size() ) { |
164 | 164 | jQuery.post( ajaxurl, { |
165 | 165 | action: 'sample-permalink', |
166 | 166 | post_id: post_id, |
… |
… |
function autosave_update_slug(post_id) { |
170 | 170 | function(data) { |
171 | 171 | if ( data !== '-1' ) { |
172 | 172 | jQuery('#edit-slug-box').html(data); |
173 | | makeSlugeditClickable(); |
174 | 173 | } |
175 | 174 | } |
176 | 175 | ); |