Commit Graph

36509 Commits

Author SHA1 Message Date
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
Felix Arntz 7966b89e29 Multisite: Add `$network_id` parameter to `wp_update_network_counts()`.
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
2017-04-20 00:26:30 +00:00
Felix Arntz d6297c051e Multisite: Add `$network_id` parameter to `wp_update_network_user_counts()`.
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
2017-04-20 00:13:41 +00:00
Felix Arntz 9bf39fa0fc Multisite: Add `$network_id` parameter to `wp_update_network_site_counts()`.
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
2017-04-19 23:59:16 +00:00
Sergey Biryukov ff25986f02 Docs: Improve `@param` and `@return` entries for `wp_get_post_categories()`, `wp_get_post_tags()`, and `wp_get_post_terms()`.
Props philipjohn, theMikeD.
Fixes #40481.

git-svn-id: https://develop.svn.wordpress.org/trunk@40483 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-19 23:07:18 +00:00
Andrew Ozz 2c50a6dd24 TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur.
Props iseulde, azaozz.
Fixes #40480 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@40481 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-19 22:09:44 +00:00
Andrea Fercia 66eb13d3b2 Accessibility: Make some Widgets buttons real buttons.
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 #35622

Fixes #31476.


git-svn-id: https://develop.svn.wordpress.org/trunk@40480 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-19 21:13:53 +00:00
Andrea Fercia 9c5ba6f387 Accessibility: Make Safari 10 + VoiceOver announce repeated, identical, `wp.a11y.speak()` messages.
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
2017-04-19 19:53:00 +00:00
Dominik Schilling (ocean90) 94ad421722 Multisite: After [37918] add support for retrieving custom site properties set by the `site_details` filter.
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
2017-04-19 18:51:25 +00:00
Sergey Biryukov 43d7215a5c Editor: Define `$suffix` before using it in `_WP_Editors::print_tinymce_scripts()`.
Props imath.
Fixes #40479. See #35760.

git-svn-id: https://develop.svn.wordpress.org/trunk@40477 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-19 12:01:49 +00:00
Andrew Ozz 8a2be37451 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760

git-svn-id: https://develop.svn.wordpress.org/trunk@40476 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-19 02:37:29 +00:00
Pascal Birchler 627ba9254e Twenty Seventeen: Bump version and update the changelog.
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
2017-04-18 09:13:17 +00:00
Weston Ruter f5f0aea2a9 Customize: Use fixed-width illustrative placeholder for hex field in color picker to prevent truncation.
Props stormrockwell, sagarprajapati, Presskopp, afercia, tejas5989, westonruter, mayurk for testing.
Fixes #39096.


git-svn-id: https://develop.svn.wordpress.org/trunk@40471 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-18 00:30:07 +00:00
Pascal Birchler 417e3945d2 Twenty Seventeen: Correct heading hierarchy for posts on the front page.
When the posts page is on the front page or within a front page section, the heading hierarchy for the individual post titles needs to be adjusted accordingly.

Props joedolson, celloexpressions, davidakennedy.
Fixes #40264.


git-svn-id: https://develop.svn.wordpress.org/trunk@40458 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-17 10:08:55 +00:00
John Blackbourn b55133da6e Build/Test tools: Reverse the order in which the Travis jobs run.
As a general rule, this means the fastest test jobs now run first because each subsequent version of PHP is faster than the previous. When a committer is patiently waiting for a Travis build to complete, they are at least more likely to see unexpected failures earlier than they otherwise would.

In addition, this updates the JavaScript test job to run on PHP 7.1.

Props netweb

See #39705


git-svn-id: https://develop.svn.wordpress.org/trunk@40434 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-15 17:42:07 +00:00
John Blackbourn f57f03b935 Networks and Sites: Correct a capability check when accessing the Sites -> Add New screen.
Props flixos90

See #39156


git-svn-id: https://develop.svn.wordpress.org/trunk@40433 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-15 17:29:55 +00:00
Sergey Biryukov d68a189288 Docs: Update the length limit in `set_site_transient()` docs after [34030].
Props lukecavanagh, jdgrimes.
Fixes #40455.

git-svn-id: https://develop.svn.wordpress.org/trunk@40432 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-15 09:27:22 +00:00
Adam Silverstein 0bdd57140b Upload: improve legacy SWFUpload event handlers for current jQuery.
Fix an issue where legacy JavaScript for SWFUpload still used jQuery's 
deprecated `live` event which no longer works - switch to using `on`.
This JavaScript is still used by some plugins and themes.

Props MMDeveloper.
Fixes #39886.



git-svn-id: https://develop.svn.wordpress.org/trunk@40431 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-14 16:42:16 +00:00
James Nylen a92edf9e9a Media: Default to always showing the "Create Audio/Video Playlist" buttons.
This avoids a couple of expensive queries that attempt to determine whether the media library contains any audio or video items, and also makes the UI for creating playlists more discoverable.

[40382] and [40421] added filters to allow overriding this behavior; this commit changes the default value of the filters to always show these UI buttons and never run the expensive queries.  The old behavior can still be restored using the filters if desired.

Props sboisvert, adamsilverstein, joemcgill, jnylen0.
Fixes #31071.


git-svn-id: https://develop.svn.wordpress.org/trunk@40430 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-14 11:25:00 +00:00
Pascal Birchler b5ca4cc9c3 Media: Ensure Crop Image is always visible.
Previously, the crop button in the media modal after uploading header images or similar was hidden and the task could not be completed.

Props karinedo, sagarprajapati, Cybr, mayurk.
Fixes #40152.


git-svn-id: https://develop.svn.wordpress.org/trunk@40428 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-14 09:30:37 +00:00
Sergey Biryukov ad73270aa4 Posts, Post Types: In `wp_check_post_lock()`, check if the user with lock exists and return false otherwise.
Props arshidkv12, 1naveengiri.
Fixes #39888.

git-svn-id: https://develop.svn.wordpress.org/trunk@40424 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-13 23:08:03 +00:00
Sergey Biryukov 1fd9d6026d Posts, Post Types: Improve the docs for `wp_check_post_lock()` and `wp_set_post_lock()`.
See #39888.

git-svn-id: https://develop.svn.wordpress.org/trunk@40423 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-13 23:01:20 +00:00
Sergey Biryukov a844db32e2 Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld.
Fixes #40185.

git-svn-id: https://develop.svn.wordpress.org/trunk@40422 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-13 22:41:50 +00:00
James Nylen 11d450f47e Media: Improve filters that allow overriding slow media queries.
As a follow-up to [40382], this commit makes the following improvements:

- Make the filter names more specific.
- Fix the inline documentation (use `@param` instead of `@return).
- Use `null ===` instead of `is_null` to avoid extra function calls.
- Rename the `$has_audio` and `$has_video` variables now that they actually represent something slightly different.

See #31071.


git-svn-id: https://develop.svn.wordpress.org/trunk@40421 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-13 20:21:45 +00:00
Andrea Fercia 5fcfb9b247 Toolbar: Reset CSS properties that might be inherited from the active Theme.
The Toolbar search field, when the Toolbar is displayed on the frontend, might
inherit CSS properties from the active Theme stylesheet. For example, this
happened with Twenty Seventeen that sets `display: block;` on all the input
fields. Thus, there's the need to reset some CSS properties to avoid inheritance.

Props @sagarprajapati.
Fixes #40313.


git-svn-id: https://develop.svn.wordpress.org/trunk@40418 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-12 16:11:30 +00:00
John Blackbourn 620280474f Build/Test tools: Introduce and implement `assertNotIXRError()` and `assertIXRError()` assertion methods.
This aids in debugging XMLRPC tests which fail, by exposing the `IXR_Error` error message in the assertion failure message.

Fixes #40423


git-svn-id: https://develop.svn.wordpress.org/trunk@40417 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-12 14:58:33 +00:00
John Blackbourn 043d3b54a8 Build/Test tools: Improve the failure message reported by `assertQueryTrue()` so it's a little less cryptic.
Fixes #40411


git-svn-id: https://develop.svn.wordpress.org/trunk@40416 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-11 10:48:00 +00:00
Felix Arntz 78d7aba4ed Multisite: Replace unnecessary `is_super_admin()` check when setting up the initial network.
When using `is_super_admin()` in a non-multisite environment, the function is supposed to check for administrator capabilities. The process of querying all users and filtering them with that function can be optimized by only querying users with the administrator role instead.

Fixes #40406. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@40406 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-10 21:59:59 +00:00
Weston Ruter 1b9c964e81 Customize: Verify availability of `history.replaceState` (in IE9) before attempting to populate `changeset_uuid` parameter.
Props westonruter, timmydcrawford for testing.
Amends [39686].
See #39227.
Fixes #40405.


git-svn-id: https://develop.svn.wordpress.org/trunk@40405 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-10 21:14:50 +00:00
Felix Arntz 1abf42b45e Multisite: Introduce an `upgrade_network` capability.
Prior to this change, a mix of `is_super_admin()` calls and `manage_network` capability checks was used to determine whether the current user could upgrade the network. With this changeset a dedicated capability is introduced that allows more granular handling.

Props dhanendran for the original patch.
Fixes #39205. See #37616.


git-svn-id: https://develop.svn.wordpress.org/trunk@40404 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-10 21:10:48 +00:00