From 00d285d0dd84d14fff5233e86d7b732f6321338c Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 6 Jan 2005 22:51:44 +0000 Subject: [PATCH] Cleaning up filters and format-to-post git-svn-id: https://develop.svn.wordpress.org/trunk@2059 602fd350-edb4-49c9-b593-d223f7449a82 --- 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) {