From 267655af2412b4951a0ff78c3fe07fa221d56203 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 14 Mar 2005 00:55:21 +0000 Subject: [PATCH] Apply filters to trackback content. http://mosquito.wordpress.org/view.php?id=1085 Props: kim git-svn-id: http://svn.automattic.com/wordpress/trunk@2442 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index df6175f440..cc9f84941e 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -525,14 +525,17 @@ function do_trackbacks($post_id) { $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = $post_id"); $to_ping = get_to_ping($post_id); $pinged = get_pung($post_id); - $content = strip_tags($post->post_content); - $excerpt = strip_tags($post->post_excerpt); - $post_title = strip_tags($post->post_title); - if ( $excerpt ) - $excerpt = substr($excerpt, 0, 252) . '...'; + if (empty($post->post_excerpt)) + $excerpt = apply_filters('the_content', $post->post_content); else - $excerpt = substr($content, 0, 252) . '...'; + $excerpt = apply_filters('the_excerpt', $post->post_excerpt); + $excerpt = str_replace(']]>', ']]>', $excerpt); + $excerpt = strip_tags($excerpt); + $excerpt = substr($excerpt, 0, 252) . '...'; + + $post_title = apply_filters('the_title', $post->post_title); + $post_title = strip_tags($post_title); if ($to_ping) : foreach ($to_ping as $tb_ping) : $tb_ping = trim($tb_ping);