Ticket #14321: permalink-field-for-public-post-types-only.14321.diff
| File permalink-field-for-public-post-types-only.14321.diff, 816 bytes (added by filosofo, 3 years ago) |
|---|
-
wp-admin/edit-form-advanced.php
243 243 </div> 244 244 <div class="inside"> 245 245 <?php 246 $sample_permalink_html = get_sample_permalink_html($post->ID);246 $sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) || ! empty( $post_type_object->public ) ? get_sample_permalink_html($post->ID) : ''; 247 247 $shortlink = wp_get_shortlink($post->ID, 'post'); 248 248 if ( !empty($shortlink) ) 249 249 $sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt('URL:', jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
