WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/09/2010 07:36:38 PM (11 years ago)
Author:
ryan
Message:

wp_get_shortlink() and pluggable shortlink generation. fixes #10640

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r13217 r13635  
    193193<?php
    194194$sample_permalink_html = get_sample_permalink_html($post->ID);
     195$shortlink = wp_get_shortlink($post->ID, 'post');
     196if ( !empty($shortlink) )
     197    $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>';
     198
    195199if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) { ?>
    196200    <div id="edit-slug-box">
Note: See TracChangeset for help on using the changeset viewer.