WordPress.org

Make WordPress Core

Ticket #40711: 40711.diff

File 40711.diff, 466 bytes (added by Soean, 3 years ago)

Implements the code from the description.

  • src/wp-includes/class-wp-post.php

     
    227227                        wp_cache_add( $_post->ID, $_post, 'posts' );
    228228                } elseif ( empty( $_post->filter ) ) {
    229229                        $_post = sanitize_post( $_post, 'raw' );
     230                        wp_cache_replace( $_post->ID, $_post, 'posts' );
    230231                }
    231232
    232233                return new WP_Post( $_post );