Move balanceTags into filters.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55d5e9f47a
commit
f285ca5c55
|
@ -48,9 +48,9 @@ case 'post':
|
||||||
$post_ID = $wpdb->get_var("SELECT ID FROM $wpdb->posts ORDER BY ID DESC LIMIT 1") + 1;
|
$post_ID = $wpdb->get_var("SELECT ID FROM $wpdb->posts ORDER BY ID DESC LIMIT 1") + 1;
|
||||||
|
|
||||||
$post_pingback = intval($_POST['post_pingback']);
|
$post_pingback = intval($_POST['post_pingback']);
|
||||||
$content = balanceTags($_POST['content']);
|
$content = apply_filters('content_save_pre', $_POST['content']);
|
||||||
$content = format_to_post($content);
|
$content = format_to_post($content);
|
||||||
$excerpt = balanceTags($_POST['excerpt']);
|
$excerpt = apply_filters('excerpt_save_pre',$_POST['excerpt']);
|
||||||
$excerpt = format_to_post($excerpt);
|
$excerpt = format_to_post($excerpt);
|
||||||
$post_title = $_POST['post_title'];
|
$post_title = $_POST['post_title'];
|
||||||
$post_categories = $_POST['post_category'];
|
$post_categories = $_POST['post_category'];
|
||||||
|
@ -281,9 +281,9 @@ case 'editpost':
|
||||||
$post_ID = $_POST['post_ID'];
|
$post_ID = $_POST['post_ID'];
|
||||||
$post_categories = $_POST['post_category'];
|
$post_categories = $_POST['post_category'];
|
||||||
if (!$post_categories) $post_categories[] = 1;
|
if (!$post_categories) $post_categories[] = 1;
|
||||||
$content = balanceTags($_POST['content']);
|
$content = apply_filters('content_save_pre', $_POST['content']);
|
||||||
$content = format_to_post($content);
|
$content = format_to_post($content);
|
||||||
$excerpt = balanceTags($_POST['excerpt']);
|
$excerpt = apply_filters('excerpt_save_pre', $_POST['excerpt']);
|
||||||
$excerpt = format_to_post($excerpt);
|
$excerpt = format_to_post($excerpt);
|
||||||
$post_title = $_POST['post_title'];
|
$post_title = $_POST['post_title'];
|
||||||
$prev_status = $_POST['prev_status'];
|
$prev_status = $_POST['prev_status'];
|
||||||
|
@ -702,7 +702,7 @@ case 'editedcomment':
|
||||||
} else {
|
} else {
|
||||||
$datemodif = '';
|
$datemodif = '';
|
||||||
}
|
}
|
||||||
$content = balanceTags($_POST['content']);
|
$content = apply_filters('comment_save_pre', $_POST['content']);
|
||||||
$content = format_to_post($content);
|
$content = format_to_post($content);
|
||||||
|
|
||||||
$result = $wpdb->query("
|
$result = $wpdb->query("
|
||||||
|
|
|
@ -48,8 +48,6 @@ if ( '' == $comment )
|
||||||
$now = current_time('mysql');
|
$now = current_time('mysql');
|
||||||
$now_gmt = current_time('mysql', 1);
|
$now_gmt = current_time('mysql', 1);
|
||||||
|
|
||||||
|
|
||||||
$comment = balanceTags($comment, 1);
|
|
||||||
$comment = format_to_post($comment);
|
$comment = format_to_post($comment);
|
||||||
$comment = apply_filters('post_comment_text', $comment);
|
$comment = apply_filters('post_comment_text', $comment);
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,17 @@ add_filter('comment_url', 'clean_url');
|
||||||
add_filter('comment_text', 'convert_chars');
|
add_filter('comment_text', 'convert_chars');
|
||||||
add_filter('comment_text', 'make_clickable');
|
add_filter('comment_text', 'make_clickable');
|
||||||
add_filter('comment_text', 'wpautop', 30);
|
add_filter('comment_text', 'wpautop', 30);
|
||||||
add_filter('comment_text', 'balanceTags');
|
add_filter('comment_text', 'balanceTags', 50);
|
||||||
add_filter('comment_text', 'convert_smilies', 20);
|
add_filter('comment_text', 'convert_smilies', 20);
|
||||||
|
|
||||||
add_filter('comment_excerpt', 'convert_chars');
|
add_filter('comment_excerpt', 'convert_chars');
|
||||||
|
|
||||||
|
// Places to balance tags on input
|
||||||
|
add_filter('post_comment_text', 'balanceTags', 50);
|
||||||
|
add_filter('content_save_pre', 'balanceTags', 50);
|
||||||
|
add_filter('excerpt_save_pre', 'balanceTags', 50);
|
||||||
|
add_filter('comment_save_pre', 'balanceTags', 50);
|
||||||
|
|
||||||
function comments_template() {
|
function comments_template() {
|
||||||
global $withcomments, $post, $wpdb, $id, $comment;
|
global $withcomments, $post, $wpdb, $id, $comment;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue