Ticket #14760: 14760-button2.diff
File 14760-button2.diff, 890 bytes (added by , 11 years ago) |
---|
-
wp-admin/edit-form-advanced.php
368 368 <?php 369 369 $sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : ''; 370 370 $shortlink = wp_get_shortlink($post->ID, 'post'); 371 if ( !empty( $shortlink) )371 if ( !empty( $shortlink ) && $shortlink !== get_permalink( $post->ID ) ) 372 372 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 373 373 374 374 if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) {