Make WordPress Core

Changeset 48226


Ignore:
Timestamp:
06/30/2020 11:14:33 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct $wp_query global reference in render_block().

See #49927, #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks.php

    r48224 r48226  
    650650 * @since 5.0.0
    651651 *
    652  * @global WP_Post  $post         The post to edit.
    653  * @global WP_Query $wp_the_query WordPress Query object.
     652 * @global WP_Post  $post     The post to edit.
     653 * @global WP_Query $wp_query WordPress Query object.
    654654 *
    655655 * @param array $parsed_block A single parsed block object.
     
    690690
    691691        /*
    692         * The `postType` context is largely unnecessary server-side, since the
    693         * ID is usually sufficient on its own. That being said, since a block's
    694         * manifest is expected to be shared between the server and the client,
    695         * it should be included to consistently fulfill the expectation.
    696         */
     692         * The `postType` context is largely unnecessary server-side, since the ID
     693         * is usually sufficient on its own. That being said, since a block's
     694         * manifest is expected to be shared between the server and the client,
     695         * it should be included to consistently fulfill the expectation.
     696         */
    697697        $context['postType'] = $post->post_type;
    698698    }
Note: See TracChangeset for help on using the changeset viewer.