Make WordPress Core

Changeset 49792 for trunk


Ignore:
Timestamp:
12/11/2020 04:51:15 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document the usage of $wpdb global in WP_Query::get_posts() and ::set_found_posts().

Props jontyravi.
Fixes #52027.

File:
1 edited

Legend:

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

    r49789 r49792  
    17621762     * @since 1.5.0
    17631763     *
     1764     * @global wpdb $wpdb WordPress database abstraction object.
     1765     *
    17641766     * @return WP_Post[]|int[] Array of post objects or post IDs.
    17651767     */
     
    32313233     * @since 3.5.0
    32323234     *
     3235     * @global wpdb $wpdb WordPress database abstraction object.
     3236     *
    32333237     * @param array  $q      Query variables.
    32343238     * @param string $limits LIMIT clauses of the query.
     
    32363240    private function set_found_posts( $q, $limits ) {
    32373241        global $wpdb;
     3242
    32383243        // Bail if posts is an empty array. Continue if posts is an empty string,
    32393244        // null, or false to accommodate caching plugins that fill posts later.
Note: See TracChangeset for help on using the changeset viewer.