From 095c705ffa127dee21cbb7315905efac92a57d5a Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 26 Jun 2016 18:05:22 +0000 Subject: [PATCH] Docs: Further improve the note of caution within the DocBlock description for `query_posts()`. See #32246. git-svn-id: https://develop.svn.wordpress.org/trunk@37878 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index 35662468f0..38a6928d64 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -79,9 +79,11 @@ function set_query_var( $var, $value ) { /** * Sets up The Loop with query parameters. * - * Important: This will completely override the current WordPress Loop and can easily - * produce unexpected results. In most cases, the better option is to instead modify - * specific properties of the loop using the {@see 'pre_get_posts'} action. + * Note: This function will completely override the main query and isn't intended for use + * by plugins or themes. Its overly-simplistic approach to modifying the main query can be + * problematic and should be avoided wherever possible. In most cases, there are better, + * more performant options for modifying the main query such as via the {@see 'pre_get_posts'} + * action within WP_Query. * * This must not be used within the WordPress Loop. *