The test `Tests_Comment_CheckComment::test_should_return_true_when_content_does_not_match_moderation_keys()`
did not, in fact, test for a `true` value, but for a false one.
Switching to `assertTrue()` caused a failure, because the test comment
triggered the 'comment_moderation' test. As in other tests in the file,
the solution is to force 'comment_moderation' to 0 for the purposes of
the test.
Introduced in [32519].
Props stephdau.
Fixes#40584.
git-svn-id: https://develop.svn.wordpress.org/trunk@40557 602fd350-edb4-49c9-b593-d223f7449a82
In the rare case this notice was displayed, it was unstyled. Uses the notice
error style to make it prettier and consistent with other no-js notices.
Also, some CSS clean-up.
Fixes#40529.
git-svn-id: https://develop.svn.wordpress.org/trunk@40556 602fd350-edb4-49c9-b593-d223f7449a82
This brings much needed uniformity to test skipping when a test requires Multisite or when a test should be excluded from running when Multisite is enabled.
Used in conjunction with the `@group ms-required` and `@group ms-excluded` notation, this removes a significant number of skipped tests from the default test suite run.
Fixes#40531
git-svn-id: https://develop.svn.wordpress.org/trunk@40543 602fd350-edb4-49c9-b593-d223f7449a82
The Travis cache is specific to the branch and language version (PHP version), so this should speed up each subsequent build once the cache is primed.
Props netweb
Fixes#40539
git-svn-id: https://develop.svn.wordpress.org/trunk@40538 602fd350-edb4-49c9-b593-d223f7449a82
Add new filter `nav_menu_submenu_css_class` to the `Walker_Nav_Menu::start_el()` method, allowing themers to modify the sub menu classes output by `wp_nav_menu()`.
Props: csloisel, darthaud, raisonon.
Fixes: #36163.
git-svn-id: https://develop.svn.wordpress.org/trunk@40537 602fd350-edb4-49c9-b593-d223f7449a82
This adds a compatibility shim for the new namespaced structure of PHPUnit and the removed `setExpectedException()` method. In addition, this updates the Travis config so PHPUnit 6.1 is used where appropriate.
Props miyauchi, gitlost.
Fixes#39822
git-svn-id: https://develop.svn.wordpress.org/trunk@40536 602fd350-edb4-49c9-b593-d223f7449a82
If any of these constants are set during testing, they should cause the tests to fail, not to be skipped, otherwise we have a situation where failure conditions are never seen.
See #40533
git-svn-id: https://develop.svn.wordpress.org/trunk@40525 602fd350-edb4-49c9-b593-d223f7449a82
Tests in the `ms-excluded` group are now excluded when running tests with multisite enabled, and tests in the `ms-required` group are excluded when running tests without multisite enabled. The end result is a significantly reduced number of skipped tests polluting PHPUnit's output, which means verbose mode can be used to more easily see which tests are skipped or incomplete, and why.
See #40531
git-svn-id: https://develop.svn.wordpress.org/trunk@40520 602fd350-edb4-49c9-b593-d223f7449a82
This sort of behaviour subtly hides the fact that these tests will never fail if the URLs where version number information is fetched from go away for one reason or another.
See #40533
git-svn-id: https://develop.svn.wordpress.org/trunk@40519 602fd350-edb4-49c9-b593-d223f7449a82
This is a remnant of the test suite behaviour before #30284 fixed most of it and makes it far too easy to hide failing tests.
If any tests begin to fail as a result of this change then they should be fixed.
Fixes#40534
git-svn-id: https://develop.svn.wordpress.org/trunk@40518 602fd350-edb4-49c9-b593-d223f7449a82
While using `_n_noop()` here is technically incorrect, it does correct the fallback value as its usage in `translate_nooped_plural()` expects a correctly formatted associative array.
Props xrmx
Fixes#38686
git-svn-id: https://develop.svn.wordpress.org/trunk@40516 602fd350-edb4-49c9-b593-d223f7449a82
[7520] introduced an undocumented feature whereby developers could
register a custom taxonomy with an 'args' parameter, consisting of
an array of config params that, when present, override corresponding
params in the `$args` array passed to `wp_get_object_terms()` when
using that function to query for terms in the specified taxonomy.
The `wp_get_object_terms()` refactor in [38667] failed to respect
this secret covenant, and the current changeset atones for the
transgression.
Props danielbachhuber.
Fixes#40496.
git-svn-id: https://develop.svn.wordpress.org/trunk@40513 602fd350-edb4-49c9-b593-d223f7449a82
After the `$network_id` parameter has been introduced for `wp_update_network_site_counts()` in [40484] and `wp_update_network_user_counts()` in [40485], the new parameter can now also be used on the wrapping function.
Fixes#40386. See #38699.
git-svn-id: https://develop.svn.wordpress.org/trunk@40486 602fd350-edb4-49c9-b593-d223f7449a82
Using the new parameter, it is now possible to update the user count on a network different from the current one. While the count itself is technically a global user count and not network-wide, it is stored on each individual network, and the new parameter provides more control about where to update the count.
Fixes#40349. See #38699.
git-svn-id: https://develop.svn.wordpress.org/trunk@40485 602fd350-edb4-49c9-b593-d223f7449a82
Using the new parameter, it is now possible to update the site counts on a network different from the current network.
Props PieWP, johnjamesjacoby.
Fixes#37528. See #38699.
git-svn-id: https://develop.svn.wordpress.org/trunk@40484 602fd350-edb4-49c9-b593-d223f7449a82
Links used as UI controls that behave like buttons, should be buttons.
- changes the widgets "toggle", "Delete", and "Close" links to buttons
- uses `aria-expanded` to announce the state of the toggle buttons
- increases a bit the clickable area of the toggle
- ensures the "circular focus" doesn't get cut-off in some browsers by centering the toggle arrows
- uses a `<span>` element with an `aria-hidden` attribute to hide CSS generated font icons from assistive technologies
- standardizes on `.toggle-indicator:before` rather than `:after`
- changes two `#f00` reds in `#dc3232`, see #35622Fixes#31476.
git-svn-id: https://develop.svn.wordpress.org/trunk@40480 602fd350-edb4-49c9-b593-d223f7449a82
Safari 10 + VoiceOver don't announce repeated, identical, strings sent to an
`aria-live` region. Appending a `no-break space` to a repeated message string,
forces them to think the strings are different.
Fixes#36853.
git-svn-id: https://develop.svn.wordpress.org/trunk@40479 602fd350-edb4-49c9-b593-d223f7449a82
The behaviour was previously possible with the `blog_details` filter and `get_blog_details()` function. The former is deprecated since [38936].
This change adjusts the magic methods of `WP_Site` to also check if `$key` exists in `WP_Site::get_details()`.
Fixes#40458.
git-svn-id: https://develop.svn.wordpress.org/trunk@40478 602fd350-edb4-49c9-b593-d223f7449a82
Updates changelog to link to Codex pages, like other default themes.
Props swissspidy, davidakennedy.
Fixes #40461.
git-svn-id: https://develop.svn.wordpress.org/trunk@40472 602fd350-edb4-49c9-b593-d223f7449a82