Ticket #16478: 16478.diff
| File 16478.diff, 2.0 KB (added by , 15 years ago) |
|---|
-
wp-admin/includes/post.php
1164 1164 $return .= '‎'; // Fix bi-directional text display defect in RTL languages. 1165 1165 $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"; 1166 1166 $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n"; 1167 if ( isset($view_post) ) 1167 if ( isset($view_post) ) 1168 1168 $return .= "<span id='view-post-btn'><a href='$view_link' class='button' target='_blank'>$view_post</a></span>\n"; 1169 1170 $shortlink = wp_get_shortlink($post->ID, 'post'); 1171 if ( !empty($shortlink) ) 1172 $return .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><a href="#" class="button" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 1169 1173 1170 1174 $return = apply_filters('get_sample_permalink_html', $return, $id, $new_title, $new_slug); 1171 1175 -
wp-admin/edit-form-advanced.php
249 249 <div class="inside"> 250 250 <?php 251 251 $sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : ''; 252 $shortlink = wp_get_shortlink($post->ID, 'post');253 if ( !empty($shortlink) )254 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';255 252 256 253 if ( ! empty( $post_type_object->publicly_queryable ) && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?> 257 254 <div id="edit-slug-box">