Ticket #22223: 22223.diff
| File 22223.diff, 1.4 KB (added by , 14 years ago) |
|---|
-
wp-includes/post.php
388 388 $_post = $post; 389 389 } elseif ( is_object( $post ) ) { 390 390 if ( empty( $post->filter ) ) { 391 $_post = sanitize_post( $post, 'raw' ); 392 wp_cache_add( $post->ID, $_post, 'posts' ); 391 $core_props = WP_Post::get_core_property_list(); 392 $props = array_keys( get_object_vars( $post ) ); 393 if ( ( count( $core_props ) == count ( $props ) ) && ( ! array_diff( $core_props, $props ) ) ) { 394 $_post = sanitize_post( $post, 'raw' ); 395 wp_cache_add( $post->ID, $_post, 'posts' ); 396 } else { 397 $_post = sanitize_post( $post, 'raw' ); 398 } 393 399 $_post = new WP_Post( $_post ); 394 400 } elseif ( 'raw' == $post->filter ) { 395 401 $_post = new WP_Post( $post ); … … 542 548 543 549 return $post; 544 550 } 551 552 public static function get_core_property_list() { 553 return array ( 554 'ID', 555 'post_author', 556 'post_date', 557 'post_date_gmt', 558 'post_content', 559 'post_title', 560 'post_excerpt', 561 'post_status', 562 'comment_status', 563 'ping_status', 564 'post_password', 565 'post_name', 566 'to_ping', 567 'pinged', 568 'post_modified', 569 'post_modified_gmt', 570 'post_content_filtered', 571 'post_parent', 572 'guid', 573 'menu_order', 574 'post_type', 575 'post_mime_type', 576 'comment_count', 577 ); 578 } 545 579 } 546 580 547 581 /**
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)