From f72de4fff3c709358f416ab3dd3b250259b9f544 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Thu, 13 Jul 2017 15:41:15 +0000 Subject: [PATCH] Docs: Document usage of the `$wpdb` global in `WP_Query::parse_search()` and `WP_Query::parse_orderby()`. Props avinapatel. Fixes #41313. git-svn-id: https://develop.svn.wordpress.org/trunk@41041 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-query.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index 518e5638b6..cc415a44d6 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -1292,9 +1292,12 @@ class WP_Query { } /** - * Generate SQL for the WHERE clause based on passed search terms. + * Generates SQL for the WHERE clause based on passed search terms. * * @since 3.7.0 + * @access protected + * + * @global wpdb $wpdb WordPress database abstraction object. * * @param array $q Query variables. * @return string WHERE clause. @@ -1509,6 +1512,8 @@ class WP_Query { * @since 4.0.0 * @access protected * + * @global wpdb $wpdb WordPress database abstraction object. + * * @param string $orderby Alias for the field to order by. * @return string|false Table-prefixed value to used in the ORDER clause. False otherwise. */