Ticket #33495: edit-form-advanced-v2.patch
File edit-form-advanced-v2.patch, 1.2 KB (added by , 9 years ago) |
---|
-
wp-admin/edit-form-advanced.php
537 537 $shortlink = wp_get_shortlink($post->ID, 'post'); 538 538 539 539 if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) 540 $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>';540 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" />'; 541 541 542 if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) 543 $sample_permalink_html .= '<a href="#" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>'; 544 542 545 if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { 543 546 $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status; 544 547 ?>