From 99df7e3a03bf392df94591240da6d51b87022a26 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 6 Jan 2005 22:51:44 +0000 Subject: [PATCH] Cleaning up filters and format-to-post git-svn-id: http://svn.automattic.com/wordpress/trunk@2059 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/post.php | 5 ----- wp-includes/vars.php | 1 - xmlrpc.php | 8 ++++---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/wp-admin/post.php b/wp-admin/post.php index 708fdcd470..23f496a576 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -30,9 +30,7 @@ case 'post': $post_pingback = intval($_POST['post_pingback']); $content = apply_filters('content_save_pre', $_POST['content']); - $content = format_to_post($content); $excerpt = apply_filters('excerpt_save_pre',$_POST['excerpt']); - $excerpt = format_to_post($excerpt); $post_title = $_POST['post_title']; $post_categories = $_POST['post_category']; $post_status = $_POST['post_status']; @@ -236,9 +234,7 @@ case 'editpost': $post_categories = $_POST['post_category']; if (!$post_categories) $post_categories[] = 1; $content = apply_filters('content_save_pre', $_POST['content']); - $content = format_to_post($content); $excerpt = apply_filters('excerpt_save_pre', $_POST['excerpt']); - $excerpt = format_to_post($excerpt); $post_title = $_POST['post_title']; $prev_status = $_POST['prev_status']; $post_status = $_POST['post_status']; @@ -607,7 +603,6 @@ case 'editedcomment': $datemodif = ''; } $content = apply_filters('comment_save_pre', $_POST['content']); - $content = format_to_post($content); $result = $wpdb->query(" UPDATE $wpdb->comments SET diff --git a/wp-includes/vars.php b/wp-includes/vars.php index a568e1870d..fe30b7dc15 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -139,7 +139,6 @@ add_filter('pre_comment_author_url', 'trim'); add_filter('pre_comment_author_url', 'clean_url'); add_filter('pre_comment_content', 'wp_filter_kses'); -add_filter('pre_comment_content', 'format_to_post'); add_filter('pre_comment_content', 'balanceTags', 30); // Default filters for these functions diff --git a/xmlrpc.php b/xmlrpc.php index 9b52dfd979..8cb3febab4 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -357,7 +357,7 @@ class wp_xmlrpc_server extends IXR_Server { $post_category = xmlrpc_getpostcategory($content); $content = xmlrpc_removepostdata($content); - $post_content = format_to_post($content); + $post_content = apply_filters( 'content_save_pre', $content ); $post_date = current_time('mysql'); $post_date_gmt = current_time('mysql', 1); @@ -411,7 +411,7 @@ class wp_xmlrpc_server extends IXR_Server { $post_category = xmlrpc_getpostcategory($content); $content = xmlrpc_removepostdata($content); - $post_content = format_to_post($content); + $post_content = apply_filters( 'content_save_pre', $content ); $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt'); @@ -489,7 +489,7 @@ class wp_xmlrpc_server extends IXR_Server { $post_author = $user_data->ID; $post_title = $content_struct['title']; - $post_content = format_to_post($content_struct['description']); + $post_content = apply_filters( 'content_save_pre', $content_struct['description'] ); $post_status = $publish ? 'publish' : 'draft'; $post_excerpt = $content_struct['mt_excerpt']; @@ -572,7 +572,7 @@ class wp_xmlrpc_server extends IXR_Server { extract($postdata); $post_title = $content_struct['title']; - $post_content = format_to_post($content_struct['description']); + $post_content = apply_filters( 'content_save_pre', $content_struct['description'] ); $catnames = $content_struct['categories']; if ($catnames) {