| 1311 | // Permalink conflict error messages. |
| 1312 | if ( $new_slug && $new_slug != $post_name_abridged ) { |
| 1313 | //error message when editing a permalink |
| 1314 | global $wpdb; |
| 1315 | $conflicting_post = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_name = %s;", $new_slug ) ); |
| 1316 | if ( $conflicting_post->post_status == 'trash' ) { |
| 1317 | echo '<div id="message" class="error"><p>'; |
| 1318 | echo sprintf( __( 'There was a permalink conflict with the post "%s" in the trash. %s' ), esc_html( $post->post_title ), '<a href="edit.php?post_status=trash&post_type=' . $post->post_type . '&s=' . $post->post_title . '">View Trash</a>'); |
| 1319 | echo '</p></div>'; |
| 1320 | } |
| 1321 | }elseif ( $orig_permalink != $post_name_abridged && $_GET['message'] == '6' ) { |
| 1322 | //error message on a newly created post |
| 1323 | echo '<div id="message" class="error"><p>'; |
| 1324 | echo sprintf( __( 'There was a permalink conflict with the post "%s" in the trash. %s' ), esc_html( $post->post_title ), '<a href="edit.php?post_status=trash&post_type=' . $post->post_type . '&s=' . $post->post_title . '">View Trash</a>' ); |
| 1325 | echo '</p></div>'; |
| 1326 | } |
| 1327 | |