Unset filter when inserting/updating posts. For 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@18368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
74b6f4305f
commit
a7e69b27f7
|
@ -2410,6 +2410,9 @@ function wp_insert_post($postarr, $wp_error = false) {
|
|||
'post_content' => '', 'post_title' => '');
|
||||
|
||||
$postarr = wp_parse_args($postarr, $defaults);
|
||||
|
||||
unset( $postarr[ 'filter' ] );
|
||||
|
||||
$postarr = sanitize_post($postarr, 'db');
|
||||
|
||||
// export array as variables
|
||||
|
@ -3584,6 +3587,8 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
|
|||
if ( !empty($parent) )
|
||||
$object['post_parent'] = $parent;
|
||||
|
||||
unset( $object[ 'filter' ] );
|
||||
|
||||
$object = sanitize_post($object, 'db');
|
||||
|
||||
// export array as variables
|
||||
|
|
Loading…
Reference in New Issue