Ticket #10801: 10801.diff
| File 10801.diff, 876 bytes (added by , 16 years ago) |
|---|
-
wp-includes/post.php
821 821 */ 822 822 function sanitize_post($post, $context = 'display') { 823 823 if ( is_object($post) ) { 824 // Is post already filtered for this context. 825 if ( isset($post->filter) && $context == $post->filter ) 826 return $post; 827 824 828 if ( !isset($post->ID) ) 825 829 $post->ID = 0; 826 830 foreach ( array_keys(get_object_vars($post)) as $field ) 827 831 $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context); 828 832 $post->filter = $context; 829 833 } else { 834 // Is post already filtered for this context. 835 if ( isset($post['filter']) && $context == $post['filter'] ) 836 return $post; 837 830 838 if ( !isset($post['ID']) ) 831 839 $post['ID'] = 0; 832 840 foreach ( array_keys($post) as $field )