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 .= '
' .
'
';
}
}
if ( $post_type_object->public
&& ! ( 'pending' === get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) )
) {
$has_sample_permalink = $sample_permalink_html && 'auto-draft' !== $post->post_status;
?>