* Performance / number of queries.
* Incorrect results caused by sticky posts.
* Back compat for filters, which had used "WHERE" while WP_Query does not; and fixing table references.
props ethitter.
fixes#26937.
git-svn-id: https://develop.svn.wordpress.org/trunk@27635 602fd350-edb4-49c9-b593-d223f7449a82
That argument currently depends on user context (see #19373).
Adds unit test for properly updating orphaned menu items.
props danielbachhuber.
fixes#27113.
git-svn-id: https://develop.svn.wordpress.org/trunk@27556 602fd350-edb4-49c9-b593-d223f7449a82
This also applies to set_post_thumbnail_size() and image_resize_dimensions().
props bradt, wonderboymusic, DH-Shredder.
fixes#19393.
git-svn-id: https://develop.svn.wordpress.org/trunk@27472 602fd350-edb4-49c9-b593-d223f7449a82
Adds unit test for `child_of` param. Adjusts unit tests for `get_terms()`.
See [27108] and [27125].
Props SergeyBiryukov.
Fixes#27123.
git-svn-id: https://develop.svn.wordpress.org/trunk@27458 602fd350-edb4-49c9-b593-d223f7449a82
* has_password true means posts with passwords, false means posts without.
* post_password can query for posts with a particular password.
props wonderboymusic, robmiller.
fixes#20308.
git-svn-id: https://develop.svn.wordpress.org/trunk@27395 602fd350-edb4-49c9-b593-d223f7449a82
Undoes [12053]. While it risks breakage, this is a far safer and saner default for these situations.
props danielbachhuber.
fixes#27020.
git-svn-id: https://develop.svn.wordpress.org/trunk@27390 602fd350-edb4-49c9-b593-d223f7449a82
Includes two trivial modifications for WordPress:
* Doesn't use the autoloader, so the check to enforce the autoloader from the constructor is removed.
* Requires class-smtp.php for backwards compatibility with direct (non-wp_mail()) uses of PHPMailer, as the autoloader isn't used.
props bpetty.
fixes#25560.
git-svn-id: https://develop.svn.wordpress.org/trunk@27385 602fd350-edb4-49c9-b593-d223f7449a82
* Moved some into private function callbacks
* Eliminated some that weren't necessary anymore
props obenland, markjaquith, nacin. fixes#14424
git-svn-id: https://develop.svn.wordpress.org/trunk@27373 602fd350-edb4-49c9-b593-d223f7449a82
This is the first big step to supporting arbitrary domains and paths. In this new approach, sites are detected first where possible, then the network is inferred. Allows filtering for arbitrary path segments, smooths out some weirdness, and removes various restrictions. A sunrise plugin could do much of its work by adding filters, if those are even needed.
see #27003.
git-svn-id: https://develop.svn.wordpress.org/trunk@27359 602fd350-edb4-49c9-b593-d223f7449a82
trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash.
props knutsp, willmot.
fixes#22267.
git-svn-id: https://develop.svn.wordpress.org/trunk@27344 602fd350-edb4-49c9-b593-d223f7449a82
did_action() returns true the moment a hook is initially run, leaving you no way to tell if the hook is still in progress. Hooks can be nested and this checks the entire stack, versus current_filter() which only identifies the final hook in the stack. This commit also introduces current_action() for parity.
To tell if a hook has completed, one can use did_action() and ! doing_action() together.
The functions do not require an argument. In that situation, they indicate whether the stack is empty.
props ericmann for the initial unit tests.
fixes#14994.
git-svn-id: https://develop.svn.wordpress.org/trunk@27294 602fd350-edb4-49c9-b593-d223f7449a82
Tries to get network detection under control by simplifying wpmu_current_site(). It now also pops off each subdomain to find a more general match. Adds unit tests for get_network_by_path() and a new network factory for unit tests.
Much of this is likely to change in 3.9 as more of ms-load.php and ms-settings.php gets hacked to bits.
props jeremyfelt.
see #27003.
git-svn-id: https://develop.svn.wordpress.org/trunk@27178 602fd350-edb4-49c9-b593-d223f7449a82
"The cache invalidation with static was introduced in r9102 with version 2.7. Multisite wasn't in core back then, so something like switch_to_blog() wasn't a concern, but now it breaks if you switch the blog in between calls to clean_term_cache."
This solution is simpler. All unit tests pass. Removes unnecessary tests linked to removed functions.
Props kovshenin.
Fixes#14485, #22526.
git-svn-id: https://develop.svn.wordpress.org/trunk@27163 602fd350-edb4-49c9-b593-d223f7449a82
This was broken through a change in [25163]. `_menu_item_object` in wp_get_associated_nav_menu_items() is not relevant for post types.
Adds unit tests.
props UmeshSingla for initial patch.
fixes#26795.
git-svn-id: https://develop.svn.wordpress.org/trunk@27150 602fd350-edb4-49c9-b593-d223f7449a82