Make WordPress Core

Changeset 37878


Ignore:
Timestamp:
06/26/2016 06:05:22 PM (8 years ago)
Author:
DrewAPicture
Message:

Docs: Further improve the note of caution within the DocBlock description for query_posts().

See #32246.

File:
1 edited

Legend:

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

    r37877 r37878  
    8080 * Sets up The Loop with query parameters.
    8181 *
    82  * Important: This will completely override the current WordPress Loop and can easily
    83  * produce unexpected results. In most cases, the better option is to instead modify
    84  * specific properties of the loop using the {@see 'pre_get_posts'} action.
     82 * Note: This function will completely override the main query and isn't intended for use
     83 * by plugins or themes. Its overly-simplistic approach to modifying the main query can be
     84 * problematic and should be avoided wherever possible. In most cases, there are better,
     85 * more performant options for modifying the main query such as via the {@see 'pre_get_posts'}
     86 * action within WP_Query.
    8587 *
    8688 * This must not be used within the WordPress Loop.
Note: See TracChangeset for help on using the changeset viewer.