do_action( 'edit_form_before_permalink',
$post );
?>
<div class="inside">
<?php
if ( $viewable ) :
$sample_permalink_html =
$post_type_object->public ?
get_sample_permalink_html( $post->ID
) : '';
// As of 4.4, the Get Shortlink button is hidden by default.
if ( has_filter( 'pre_get_shortlink'
) ||
has_filter( 'get_shortlink'
) ) { $shortlink =
wp_get_shortlink( $post->ID, 'post'
);
if ( !
empty( $shortlink ) &&
$shortlink !==
$permalink &&
home_url( '?page_id=' .
$post->ID
) !==
$permalink ) { $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' .
esc_attr( $shortlink ) . '" />' .
'<button type="button" class="button button-small" onclick="prompt('URL:', jQuery(\'#shortlink\').val());">' .
__( 'Get Shortlink'
) .
'</button>';
} }