Changeset 14446
- Timestamp:
- 05/04/2010 06:18:35 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/post.php
r14404 r14446 1068 1068 */ 1069 1069 function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { 1070 global $wpdb; 1070 1071 $post = &get_post($id); 1072 $orig_permalink = sanitize_title($post->post_title); 1071 1073 list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); 1072 1074 … … 1108 1110 } else { 1109 1111 $post_name_abridged = $post_name; 1112 } 1113 } 1114 1115 if ( $orig_permalink != $post_name_abridged && !$post->post_name ) { 1116 //check if post is trashed 1117 $orig_ID = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_status='trash';",$orig_permalink)); 1118 if ( $orig_ID ) { 1119 ?> 1120 <div id="message" class="error"> 1121 <?php _e('There was a permalink conflict with an item in the trash. <a href="edit.php?post_status=trash&post_type='.$post->post_type.'">View Trash</a>'); ?> 1122 </div> 1123 <?php 1110 1124 } 1111 1125 }
Note: See TracChangeset
for help on using the changeset viewer.