This change allows the 'list_cats' filter to be used to suppress certain
items in category lists, without creating invalid or superfluous markup.
Props samo9789.
Fixes#16792.
git-svn-id: https://develop.svn.wordpress.org/trunk@31025 602fd350-edb4-49c9-b593-d223f7449a82
This enhancement requires a modification in the way that `wp_dropdown_categories()`
prepares its arguments for `get_terms()`, so that its unrelated 'name' param is
not mistaken for the new 'name' argument in `get_terms()`.
Props danielbachhuber.
Fixes#30611.
git-svn-id: https://develop.svn.wordpress.org/trunk@31024 602fd350-edb4-49c9-b593-d223f7449a82
This change ensures that the `get_dropins()` tests don't detect any actual
dropins that you might be running on your develop.wordpress installation.
Props valendesigns.
Fixes#30860.
git-svn-id: https://develop.svn.wordpress.org/trunk@31009 602fd350-edb4-49c9-b593-d223f7449a82
The new 'value_field' parameter makes it possible to set term slugs (or some
other term property) as the 'value' attribute of the option elements generated
by `wp_dropdown_categories()`. This additional flexibility reduces the effort
required to translate term_id to other term fields when processing form
submissions that include values from taxonomy dropdowns. See #30865 for a
use case.
Props collinsinternet.
Fixes#30306.
git-svn-id: https://develop.svn.wordpress.org/trunk@31006 602fd350-edb4-49c9-b593-d223f7449a82
This creates parity with the behavior of the function when plugins *are* active,
but none are invalid. It also makes it possible to write unit tests for the
function.
Props sgrant.
Fixes#30860.
git-svn-id: https://develop.svn.wordpress.org/trunk@31003 602fd350-edb4-49c9-b593-d223f7449a82
- Improved cleanup for existing tests, by ensuring that plugins are deactivated.
- New tests for `get_plugin_files()`, `get_mu_plugins()`, `_sort_uname_callback()`, `get_dropins()`, `is_network_only_plugin()`, `activate_plugins()`, `validate_active_plugins()`, and `is_uninstallable_plugin()`.
Props sgrant.
See #30860.
git-svn-id: https://develop.svn.wordpress.org/trunk@31002 602fd350-edb4-49c9-b593-d223f7449a82
In 4.1 [30240], `wp_insert_term()` was modified to allow the creation of terms
with duplicate slugs, as long as the terms are in different taxonomies.
`wp_update_term()` didn't get the corresponding modification, with the result
that term updates fail when the term being updated shares a slug with an older
term, regardless of that older term's taxonomy.
Props ipm-frommen.
Fixes#30780 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@30985 602fd350-edb4-49c9-b593-d223f7449a82
This was removed in [29915] as part of the attempt to add cache support to
`get_term_by()`. When that support was removed in [30900], it was not properly
restored.
This changeset includes a unit test to verify that the cache is properly primed
for terms found in `get_terms()`, as well as tests to verify the other cache
setting that was touched by [30900].
Fixes#30749. See #21760.
git-svn-id: https://develop.svn.wordpress.org/trunk@30954 602fd350-edb4-49c9-b593-d223f7449a82
The new cache group scheme causes term invalidation to be overly broad, so
that busting the cache for one term will bust the cache for all terms in the
taxonomy. We'll have another go at more focused use of the 'last_changed'
incrementor in a future release.
Reverts [29915], [30073], [30080], [30108], [30112].
See #21760.
git-svn-id: https://develop.svn.wordpress.org/trunk@30900 602fd350-edb4-49c9-b593-d223f7449a82
As in earlier versions, EXISTS with a value is equivalent to '=', while NOT
EXISTS should always ignore 'value'.
Props barrykooij.
Fixes#30681 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@30846 602fd350-edb4-49c9-b593-d223f7449a82
* Arguments for user, path, and title are only necessary when we need to do something with those arguments later. Most cases in the ms-sites group do not require them.
* In `test_get_blog_id_from_url_is_case_insensitive()`, we should pass a lowercase domain argument.
* A user factory in `test_switch_restore_blog()` is not necessary.
See #30080
git-svn-id: https://develop.svn.wordpress.org/trunk@30786 602fd350-edb4-49c9-b593-d223f7449a82
The current tests for `update_blog_status()` mirrored the tests for `update_blog_details()` in many ways and can be split in the same way. A noticeable difference is that the the matching actions fire even when no change is made to a field.
See #30080
git-svn-id: https://develop.svn.wordpress.org/trunk@30785 602fd350-edb4-49c9-b593-d223f7449a82
The current tests for `upload_blog_details()` were focused on the actions fired whenever a site is marked as spam, archived, deleted, or matured. This breaks those into individual sections with fewer assertions per test.
See #30080
git-svn-id: https://develop.svn.wordpress.org/trunk@30784 602fd350-edb4-49c9-b593-d223f7449a82
`queried_terms`, rather than `queries`, is the tax_query property where a flat
index of terms is stored.
See [29901] for a similar fix in `redirect_canonical()`. See #29738.
Props dd32.
Fixes#30623.
git-svn-id: https://develop.svn.wordpress.org/trunk@30771 602fd350-edb4-49c9-b593-d223f7449a82
Break a single test with many assertions into many tests with single assertions.
In the process, provide separate and comprehensive tests for `upload_is_user_over_quota()`, `is_upload_space_available()`, and `get_space_allowed()`.
Also removes a check for `BLOGSUPLOADDIR`, a constant that never existed. New tests will need to be introduced to handle the ms-files group.
See #30080
git-svn-id: https://develop.svn.wordpress.org/trunk@30715 602fd350-edb4-49c9-b593-d223f7449a82
Examples: if you clean up directories in a test, or a test fails before the directories are cleaned, or a test fails before the `'upload_path'` option is reset, the next call to `wp_upload_dir()` will recreate the directories you just tried to delete.
These changes ensure that `src/foo` and `/tmp/wp-unit-test` directories are deleted immediately after `wp_upload_dir()` is fired in the tests.
Fixes#30513.
git-svn-id: https://develop.svn.wordpress.org/trunk@30658 602fd350-edb4-49c9-b593-d223f7449a82
Updates the existing test for pages which should take priority over attachments in cases where an existing clash exists.
Fixes#18962
Props boonebgorges
git-svn-id: https://develop.svn.wordpress.org/trunk@30629 602fd350-edb4-49c9-b593-d223f7449a82
This is a revert of [30494], [30492], [30347], and [30334]. The latter
changeset was a revert of [30336], which was a revert of [30241].
Watch for Term Splitting, Version III in version 4.2, coming soon to a
WordPress trunk near you.
See #30335, #5809.
git-svn-id: https://develop.svn.wordpress.org/trunk@30585 602fd350-edb4-49c9-b593-d223f7449a82