Don't return early before filtering.

git-svn-id: https://develop.svn.wordpress.org/trunk@7161 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2008-03-05 18:49:56 +00:00
parent dc3a3d242c
commit d1a9adb980
1 changed files with 0 additions and 4 deletions

View File

@ -725,13 +725,9 @@ function sanitize_post($post, $context = 'display') {
if ( 'raw' == $context )
return $post;
if ( is_object($post) ) {
if ( !isset($post->ID) )
return $post;
foreach ( array_keys(get_object_vars($post)) as $field )
$post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
} else {
if ( !isset($post['ID']) )
return $post;
foreach ( array_keys($post) as $field )
$post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
}