Commit Graph

36688 Commits

Author SHA1 Message Date
Andrea Fercia e49e372671 Accessibility: Improve the color contrast ratio of the dismiss notice buttons.
Props chris_dev.
Fixes #39970.


git-svn-id: https://develop.svn.wordpress.org/trunk@40570 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-04 22:31:17 +00:00
Andrea Fercia 859c3551ac Customize: Fix a visual glitch on the widget control animation introduced in [40480].
Also, restores the original design intent that was meant to "compact widget-tops
on smaller laptops, but not tablets".

See #27112.
Fixes #31476.


git-svn-id: https://develop.svn.wordpress.org/trunk@40569 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-03 22:38:26 +00:00
Andrea Fercia 2dec345a1b Accessibility: Avoid a keyboard trap on the date and time custom format settings.
Using the `focus` event on the date and time custom format fields made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom format setting. Instead, using `click` and `input` preserves
the original functionality when using any kind of pointing or input device.

Fixes #40515.


git-svn-id: https://develop.svn.wordpress.org/trunk@40568 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-02 20:02:49 +00:00
Weston Ruter 7f3f93c1d1 Customize: Allow `select` dropdowns to stretch full width in widened controls pane.
Props timmydcrawford.
Amends [40511].
Fixes #32296.


git-svn-id: https://develop.svn.wordpress.org/trunk@40567 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-02 19:29:06 +00:00
Sergey Biryukov 9e07667864 Menus: Introduce `page_menu_link_attributes` filter in `Walker_Page::start_el()` for the HTML attributes applied to a page menu item's anchor element.
This complements the `nav_menu_link_attributes` filter used in `Walker_Nav_Menu::start_el()`.

Props pbiron.
Fixes #40359.

git-svn-id: https://develop.svn.wordpress.org/trunk@40565 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 23:31:16 +00:00
John Blackbourn c759785cea Build/Test Tools: Automatically skip tests in the `ms-required` and `ms-excluded` groups.
This removes the need to manually call `$this->skipWithMultisite()` and `$this->skipWithoutMultisite()` from within the test when the test only runs without Multisite or only runs on Multisite, respectively.

Props jdgrimes for the suggestion.

Fixes #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40564 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 20:34:10 +00:00
John Blackbourn f72ce6dc6e Users: Add two missing special cases to the capability tests for non-logged-in users.
Also updates a `expectedIncorrectUsage` notation.

See #37405


git-svn-id: https://develop.svn.wordpress.org/trunk@40563 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 16:18:19 +00:00
John Blackbourn 34207d7aeb Build/Test Tools: Pin the WordPress Importer plugin to version 0.6.3 when testing on Travis.
Fixes #40620


git-svn-id: https://develop.svn.wordpress.org/trunk@40562 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 11:29:29 +00:00
John Blackbourn 46fab9de51 Build/Test Tools: Add object-cache.php to the unit test suite.
This removes an unnecessary external dependency from the Travis tests.

Fixes #40619


git-svn-id: https://develop.svn.wordpress.org/trunk@40561 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 11:20:30 +00:00
John Blackbourn c2fd41759c Users: Ensure user counts remain accurate if users are added to or removed from the `users` table without corresponding `usermeta` entries being added or removed.
This has a slight performance impact on sites with a large number of users when the `time` strategy is used for counting users. Hopefully this impact will be negated by enhancements proposed in #38741.

Props psoluch, dots, boonebgorges, ptbello, tharsheblows

Fixes #29785


git-svn-id: https://develop.svn.wordpress.org/trunk@40560 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-30 13:02:50 +00:00
John Blackbourn 7c1d20422f Posts, Post Types: Revert [40558] pending investigation.
See #18375


git-svn-id: https://develop.svn.wordpress.org/trunk@40559 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-30 11:18:43 +00:00
John Blackbourn 0940f8396c Posts, Post Types: Correct the attachment post type template unit test introduced in [38951].
Also adds additional assertions for the templates.

See #18375


git-svn-id: https://develop.svn.wordpress.org/trunk@40558 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-29 21:15:34 +00:00
Boone Gorges 7c4248b5e0 Fix broken `check_comment()` test.
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
2017-04-27 16:22:36 +00:00
Andrea Fercia 5d027d64fd Widgets: Improve the News dashboard widget no-js notice.
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
2017-04-25 16:41:26 +00:00
John Blackbourn 626547e9cf Feeds: Remove an incorrect usage of `sizeof()` in a helper class used during unit testing of XML element handling.
This also helps tidy up the test output when running PHP 7.2.

See #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@40555 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-24 01:22:39 +00:00
John Blackbourn 127b1592f7 Build/Test Tools: Remove HHVM from the test infrastructure on Travis.
Fixes #40548


git-svn-id: https://develop.svn.wordpress.org/trunk@40546 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-24 00:27:28 +00:00
John Blackbourn 4602012570 REST API: Remove a useless unit test.
See #35907, #38373


git-svn-id: https://develop.svn.wordpress.org/trunk@40545 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 22:19:29 +00:00
John Blackbourn a16ada6d31 Build/Test Tools: Remove more unnecessary test skipping when erroneous situations occur.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40544 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 22:11:52 +00:00
John Blackbourn 64f8351da1 Build/Test Tools: Introduce `skipWithoutMultisite()` and `skipWithMultisite`() methods into the test suite.
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
2017-04-23 21:57:31 +00:00
John Blackbourn e3a9d87083 Build/Test Tools: More tweaks to the deprecated calls assertion. This needs to be triggered when there are unexpected deprecated calls or wrongdoings too.
See #40538


git-svn-id: https://develop.svn.wordpress.org/trunk@40542 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 21:34:37 +00:00
John Blackbourn 21ce4e90d3 Build/Test Tools: Only perform an assertion for deprecated calls and wrongdoings if any are expected.
This avoids masking risky tests that don't otherwise perform an assertion.

See #40538


git-svn-id: https://develop.svn.wordpress.org/trunk@40541 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 21:28:44 +00:00
Sergey Biryukov 1eb45efa86 Help/About: Fix typo in help text on Reading Settings screen.
Props Arena94, bhargavbhandari90.
Fixes #40530.

git-svn-id: https://develop.svn.wordpress.org/trunk@40540 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 14:33:37 +00:00
John Blackbourn f5bf5ba8b8 Build/Test Tools: Move the `setExpectedException()` method into the `WP_Ajax_UnitTestCase` class to avoid a fatal error when PHPUnit 3.6 is in use.
This needs more investigation but it gets the test suite on PHP 5.2 passing again.

See #39822


git-svn-id: https://develop.svn.wordpress.org/trunk@40539 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 11:45:46 +00:00
John Blackbourn 06391f0872 Build/Test Tools: Add Composer files to the cache on Travis.
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
2017-04-23 11:39:43 +00:00
Peter Wilson 1345e33a21 Menus: Add filter to sub-menu class in nav menus.
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
2017-04-23 07:15:47 +00:00
John Blackbourn ce8a915c06 Build/Test Tools: Add support for PHPUnit 6+.
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
2017-04-23 02:05:12 +00:00
John Blackbourn 208a5dd57f Build/Test Tools: Ensure that `WP_UnitTestCase::expectedDeprecated()` performs an assertion to avoid risky test notices.
See #40538


git-svn-id: https://develop.svn.wordpress.org/trunk@40535 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 01:44:13 +00:00
John Blackbourn a5a1a4d20e Build/Test Tools: Be strict about tests that do not test anything.
See #40538


git-svn-id: https://develop.svn.wordpress.org/trunk@40534 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-23 01:24:41 +00:00
John Blackbourn c0910cd442 Build/Test Tools: Remove unnecessary checks and skips that should instead cause failures if they ever fail.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40533 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 22:54:15 +00:00
John Blackbourn 669bd1bbc3 Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40532 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 22:11:56 +00:00
John Blackbourn 446189eac7 Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40531 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 22:00:15 +00:00
John Blackbourn b060b7e503 Build/Test Tools: Correct an incorrect `ms-` group name.
See #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40530 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 21:43:13 +00:00
John Blackbourn 583e7a41bc Build/Test Tools: Partially revert [40524].
See #40533, #40535


git-svn-id: https://develop.svn.wordpress.org/trunk@40529 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 21:21:30 +00:00
John Blackbourn 64581a4f05 Build/Test Tools: Add some locale debugging to the Travis config so we can determine which locales are available to test with.
See #40533, #19861


git-svn-id: https://develop.svn.wordpress.org/trunk@40528 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 21:00:07 +00:00
John Blackbourn 5d58054f35 Build/Test Tools: Enable verbose mode in PHPUnit so we can see which tests are being skipped, and now that the number of skipped tests has been lowered.
See #40533, #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40527 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 20:24:11 +00:00
John Blackbourn f017338460 Build/Test Tools: Don't trigger a skipped test when the built version of `wp-embed.min.js` isn't present.
The grunt command assertion prior to the check for the existence of the file is enough to safeguard this test.

See #34698, #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40526 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 20:17:49 +00:00
John Blackbourn d4effd5d6b Build/Test Tools: Replace test skipping with actual assertions when dealing with the `DISALLOW_UNFILTERED_HTML`, `DISALLOW_FILE_MODS`, and `DISALLOW_FILE_EDIT` constants.
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
2017-04-22 20:12:29 +00:00
John Blackbourn 950b185aa7 Build/Test Tools: Remove more skipped tests that should actually be failures if their conditions aren't satisfied.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40524 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 19:42:12 +00:00
John Blackbourn b987aa93a7 Build/Test Tools: Remove ancient UT ticket handling.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40523 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 19:38:42 +00:00
John Blackbourn caf86dc849 Build/Test Tools: Add some more tests to the `ms-required` and `ms-excluded` groups.
See #40531


git-svn-id: https://develop.svn.wordpress.org/trunk@40522 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 19:21:11 +00:00
John Blackbourn 021dce3aa2 Build/Test Tools: Remove a useless test.
See #33898, #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40521 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 19:09:09 +00:00
John Blackbourn 4f8057f7d5 Build/Test Tools: Introduce `ms-required` and `ms-excluded` groups for tests.
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
2017-04-22 18:58:46 +00:00
John Blackbourn c717bfbba9 Build/Test Tools: Don't skip tests when php.net or dev.mysql.com are unreachable.
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
2017-04-22 18:44:18 +00:00
John Blackbourn 040b411ec2 Build/Test Tools: Avoid skipping canonical tests that are connected to open Trac tickets.
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
2017-04-22 18:25:30 +00:00
John Blackbourn 2eb8cb7ca2 Canonical: Don't skip tests if the test data is invalid.
See #40533


git-svn-id: https://develop.svn.wordpress.org/trunk@40517 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 17:29:03 +00:00
John Blackbourn 58b60158c7 Posts, Post Types: Correct the fallback value for the `label_count` argument of `register_post_status()`.
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
2017-04-22 14:16:56 +00:00
Andrew Ozz 7b66ef190c Editor: fix undefined var notice in editor_js() in class-wp-editor.php.
Props littler.chicken.
Fixes #40501, see #35760.

git-svn-id: https://develop.svn.wordpress.org/trunk@40515 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 01:11:23 +00:00
Boone Gorges ccd942ddaa Restore support for taxonomy 'args' override when querying object terms.
[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
2017-04-21 19:13:51 +00:00
Weston Ruter 6ea3026565 Customize: Increase width of controls pane on large monitors to give more room.
Props celloexpressions, timmydcrawford.
Fixes #32296.


git-svn-id: https://develop.svn.wordpress.org/trunk@40511 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-21 05:24:52 +00:00
Weston Ruter 63e6a6b7e7 Customize: Fix visibility of "Hide Controls" link in IE.
Amends [39214].
Props timmydcrawford.
See #32296, #38762.
Fixes #40507.


git-svn-id: https://develop.svn.wordpress.org/trunk@40510 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-21 05:15:29 +00:00