wp_get_shortlink() and pluggable shortlink generation. fixes #10640

git-svn-id: https://develop.svn.wordpress.org/trunk@13635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-03-09 19:36:38 +00:00
parent e71a0b3db3
commit 96ace89041
3 changed files with 85 additions and 0 deletions
+4
View File
@@ -192,6 +192,10 @@ $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
<div class="inside">
<?php
$sample_permalink_html = get_sample_permalink_html($post->ID);
$shortlink = wp_get_shortlink($post->ID, 'post');
if ( !empty($shortlink) )
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) { ?>
<div id="edit-slug-box">
<?php