desrosj
d9932631e6
Grouped backports to the 4.7 branch.
...
- Query: Improve sanitization within `WP_Tax_Query`.
- Query: Improve sanitization within `WP_Meta_Query`.
- Upgrade/Install: Avoid using `unserialize()` unnecessarily.
- Formatting: Correctly encode ASCII characters in post slugs.
Merges [52454-52457] to the 4.7 branch.
Props vortfu, dd32, ehtis, zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.
Built from https://develop.svn.wordpress.org/branches/4.7@52476
git-svn-id: http://core.svn.wordpress.org/branches/4.7@52068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 18:17:12 +00:00
Gary Pendergast
af69f4ab1a
General: Restore usage of `$wpdb`, instead of `$this->db`.
...
Hiding the `$wpdb` global behind a property decreases the readability of the code, as well as causing irrelevant output when dumping an object.
Reverts [38275], [38278], [38279], [38280], [38387].
See #37699 .
Built from https://develop.svn.wordpress.org/trunk@38768
git-svn-id: http://core.svn.wordpress.org/trunk@38711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-10 06:38:31 +00:00
Scott Taylor
e7ffad7fac
Query: add a `protected` field, `$db`, (composition, as it were) to `WP_*_Query` classes to hold the value for the database abstraction, instead of importing the `global $wpdb` into every method that uses it. Reduces the number of global imports by 32.
...
See #37699 .
Built from https://develop.svn.wordpress.org/trunk@38275
git-svn-id: http://core.svn.wordpress.org/trunk@38216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-18 18:21:31 +00:00
Sergey Biryukov
d851a2cded
Taxonomy: Correct `WP_Error` usage in `WP_Tax_Query::clean_query()` and `WP_Tax_Query::transform_query()`.
...
Fixes #37389 .
Built from https://develop.svn.wordpress.org/trunk@38079
git-svn-id: http://core.svn.wordpress.org/trunk@38020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 16:33:30 +00:00
Drew Jaynes
fe3b007fdd
Docs: Remove inline `@see` tags from function, class, and method references in inline docs.
...
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.
Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@37342
git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Boone Gorges
20b1b2098a
Use `LEFT JOIN` when building `WP_Tax_Query` SQL.
...
`LEFT JOIN` ensures that `NOT EXISTS` queries will not miss posts that have
no taxonomy data whatsoever.
Props swissspidy, crstauf.
Fixes #36343 .
Built from https://develop.svn.wordpress.org/trunk@37184
git-svn-id: http://core.svn.wordpress.org/trunk@37151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-12 20:37:26 +00:00
John Blackbourn
aace0e33c1
Correct some `@param` doc names in the `WP_Tax_Query` and `WP_User_Query` classes.
...
See #32246
Built from https://develop.svn.wordpress.org/trunk@35916
git-svn-id: http://core.svn.wordpress.org/trunk@35880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 02:50:27 +00:00
Drew Jaynes
bbe7044030
Docs: Add a file header to wp-includes/class-wp-tax-query.php, introduced in [33760].
...
Also clarifies the class DocBlock summary and description for `WP_Tax_Query`.
See #33413 . See #33701 .
Built from https://develop.svn.wordpress.org/trunk@34402
git-svn-id: http://core.svn.wordpress.org/trunk@34366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 13:16:30 +00:00
Scott Taylor
fa0dc526f4
Taxonomy: move `WP_Tax_Query` into its own file. `taxonomy.php` loads the new files, so this is 100% BC if someone is loading `taxonomy.php` directly. New files created using `svn cp`.
...
Creates:
`class-wp-tax-query.php`
`taxonomy-functions.php`
`taxonomy.php` contains only top-level code. Class file only contains the class. Functions file only contains functions.
See #33413 .
Built from https://develop.svn.wordpress.org/trunk@33760
git-svn-id: http://core.svn.wordpress.org/trunk@33728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-26 12:49:21 +00:00