From 3abfce8c281338eeea01658816f4af736ef372b0 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Mon, 11 May 2009 22:10:45 +0000 Subject: [PATCH] Drop raw check in sanitize_post so int fields are always sanitized. git-svn-id: https://develop.svn.wordpress.org/trunk@11282 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 1dca39ba2f..897fb0a455 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -797,7 +797,7 @@ function is_sticky($post_id = null) { /** * Sanitize every post field. * - * If the context is 'raw', then the post object or array will just be returned. + * If the context is 'raw', then the post object or array will get minimal santization of the int fields. * * @since 2.3.0 * @uses sanitize_post_field() Used to sanitize the fields. @@ -807,8 +807,6 @@ function is_sticky($post_id = null) { * @return object|array The now sanitized Post Object or Array (will be the same type as $post) */ function sanitize_post($post, $context = 'display') { - if ( 'raw' == $context ) - return $post; if ( is_object($post) ) { if ( !isset($post->ID) ) $post->ID = 0;