| 1117 | // Permalink conflict error messages. |
| 1118 | if ( $new_slug && $new_slug != $post_name_abridged ) { |
| 1119 | echo '<div id="message" class="error"><p>'; |
| 1120 | $conflicting_post = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->posts WHERE post_name = %s;",$new_slug)); |
| 1121 | if ( $conflicting_post->post_status == 'trash' ) { |
| 1122 | _e('There was a permalink conflict with the post "' . $post->post_title . '" in the trash. <a href="edit.php?post_status=trash&post_type=' . $post->post_type . '">View Trash</a>'); |
| 1123 | } else { |
| 1124 | $conflicting_post_edit_link_url = get_edit_post_link($conflicting_post->ID); |
| 1125 | $post_type_obj = get_post_type_object( $post->post_type ); |
| 1126 | $conflicting_post_edit_link_html = '<a class="post-edit-link" href="' . $conflicting_post_edit_link_url . '" title="' . esc_attr( $post_type_obj->labels->edit_item ) . '">' . $conflicting_post->post_title . '</a>'; |
| 1127 | if ( !empty($conflicting_post) ) |
| 1128 | _e('There was a permalink conflict with the post ' . $conflicting_post_edit_link_html . ', a unique numerical string has been appended to the permalink.'); |
| 1129 | } |
| 1130 | echo '</p></div>'; |
| 1131 | } |
| 1132 | |