Make WordPress Core

Ticket #18408: 18408.6.diff

File 18408.6.diff, 772 bytes (added by Howdy_McGee, 3 months ago)

A more direct, hookless reliant patch.

  • src/wp-admin/post.php

     
    2828$post_ID = $post_id;
    2929
    3030/**
    31  * @global string  $post_type
    32  * @global object  $post_type_object
    33  * @global WP_Post $post             Global post object.
     31 * @global string   $post_type
     32 * @global object   $post_type_object
     33 * @global WP_Post  $post            Global post object.
     34 * @global WP_Query $wp_query        Global query object.
    3435 */
    3536global $post_type, $post_type_object, $post;
    3637
     
    3940}
    4041
    4142if ( $post ) {
     43        $wp_query->post   = $post;
    4244        $post_type        = $post->post_type;
    4345        $post_type_object = get_post_type_object( $post_type );
    4446}