From 666ba09317d91dc3a759a34b33daa562b3665e23 Mon Sep 17 00:00:00 2001 From: westi Date: Wed, 5 May 2010 07:37:51 +0000 Subject: [PATCH] Remove the trash warning on permalinks for now as the current implementation doesn't work very well. See #11863 git-svn-id: http://svn.automattic.com/wordpress/trunk@14462 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 3c705a3f9b..93a9ebe069 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1073,7 +1073,7 @@ function get_sample_permalink($id, $title = null, $name = null) { function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { global $wpdb; $post = &get_post($id); - $orig_permalink = sanitize_title($post->post_title); + list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug); if ( 'publish' == $post->post_status ) { @@ -1116,18 +1116,6 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { } } - if ( $orig_permalink != $post_name_abridged && !$post->post_name ) { - //check if post is trashed - $orig_ID = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s AND post_status='trash';",$orig_permalink)); - if ( $orig_ID ) { - ?> -
- View Trash'), 'edit.php?post_status=trash&post_type='.$post->post_type ); ?> -
- ' . $post_name_abridged . ''; $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);