Make WordPress Core

Ticket #40448: 40448.diff

File 40448.diff, 941 bytes (added by afercia, 9 years ago)
  • src/wp-admin/edit-form-advanced.php

     
    582582        $shortlink = wp_get_shortlink($post->ID, 'post');
    583583
    584584        if ( !empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url('?page_id=' . $post->ID) ) {
    585         $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
     585                $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr( $shortlink ) . '" /><button type="button" class="button button-small" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val());">' . __( 'Get Shortlink' ) . '</button>';
    586586        }
    587587}
    588588