Commit Graph

10352 Commits

Author SHA1 Message Date
Andrea Fercia
705ecf3312 Customize: Make the media control buttons natural-width.
Natural-width buttons are better for translations, and don't feel as
overpowering as the half-width (and full-width) buttons.

Props melchoyce, timmydcrawford, afercia.
Fixes #40220.

Built from https://develop.svn.wordpress.org/trunk@40653


git-svn-id: http://core.svn.wordpress.org/trunk@40516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 17:50:44 +00:00
Andrea Fercia
430422b0b7 Login and Registration: Add a filter to disable the initial auto-focus on the login screen.
Fixes #40301.

Built from https://develop.svn.wordpress.org/trunk@40652


git-svn-id: http://core.svn.wordpress.org/trunk@40515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 17:12:46 +00:00
Konstantin Obenland
7328d561b1 Dashboard: Persist location for community events
Fixes a bug where cached events & location data was not accessible because the
cache key could not be regenerated without latitude and longitude information.

Discovered and fixed during #wcber contributor day.

Props soean, kubik-rubik, obenland.
See #40702.
 

Built from https://develop.svn.wordpress.org/trunk@40651


git-svn-id: http://core.svn.wordpress.org/trunk@40514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 15:53:46 +00:00
Joe McGill
2b206fa18d Improve wording of the AYS warning when permanently deleting uploads, tags, posts.
This is a follow up on [40283], which cleans up the wording.

Props azaozz, swissspidy, ocean90.
Fixes #39712.

Built from https://develop.svn.wordpress.org/trunk@40650


git-svn-id: http://core.svn.wordpress.org/trunk@40513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 12:50:42 +00:00
Dominik Schilling
b43250116f Import: Replace assert() calls with PHPUnit's assertTrue() method.
Calling `assert()` with a string argument will be deprecated in PHP 7.2.

See #40109.
Built from https://develop.svn.wordpress.org/trunk@40649


git-svn-id: http://core.svn.wordpress.org/trunk@40512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 07:38:41 +00:00
Andrea Fercia
8a07db035d Add missing semicolons after [40646].
See #40453.

Built from https://develop.svn.wordpress.org/trunk@40648


git-svn-id: http://core.svn.wordpress.org/trunk@40511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 07:05:41 +00:00
Andrea Fercia
55b6ee7e56 Media: Clean-up some MediaElementJS CSS: no more needed after [40642].
See #40707, #32417, #39994, #39995, #30281.

Built from https://develop.svn.wordpress.org/trunk@40647


git-svn-id: http://core.svn.wordpress.org/trunk@40510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 07:00:45 +00:00
Andrea Fercia
bab7eb143e Accessibility: Change the "Show details" links in the update core screen to buttons.
These controls toggle the visibility of the update progress: they perform an action
therefore they should be buttons. Also:
- uses `aria-expanded` to communicate the toggle button state
- removes some inline JavaScript
- when clicking the toggle buttons, the progress details get moved with JavaScript after the button: this helps users of assistive technologies in finding them and makes the UI a bit more intuitive

Props Cheffheid, afercia.
See #26504.
Fixes #40453.

Built from https://develop.svn.wordpress.org/trunk@40646


git-svn-id: http://core.svn.wordpress.org/trunk@40507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 23:50:41 +00:00
Andrew Ozz
8c46657c9d TinyMCE: update to 4.6.1. Changelog: https://www.tinymce.com/docs/changelog/#version461-may102017
Fixes #40727.
Built from https://develop.svn.wordpress.org/trunk@40645


git-svn-id: http://core.svn.wordpress.org/trunk@40506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 23:12:40 +00:00
Andrew Ozz
da92cce494 TinyMCE: prevent removing of the temp link element when opening the advanced link dialog to insert new link.
Part props figureone for finding the cause.
Fixes #40558.
Built from https://develop.svn.wordpress.org/trunk@40644


git-svn-id: http://core.svn.wordpress.org/trunk@40505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 23:04:40 +00:00
Andrea Fercia
274596b8ef Accessibility: Add "(opens in a new window)" screen reader text to the "News-Nearby Events" dashboard widget footer links.
- standardizes similar messages in core to always use `(opens in a new window)`
- adds translators comments
- hides the dashicons with `aria-hidden="true"`, see #40428

Fixes #40733.

Built from https://develop.svn.wordpress.org/trunk@40643


git-svn-id: http://core.svn.wordpress.org/trunk@40504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 22:47:41 +00:00
Andrea Fercia
691d649329 Media: Remove the custom styling for the MediaElementJS controls offscreen text.
This offscreen text is not meant to be revealed on focus and just acts as fallback
for assistive technologies that don't support `aria-label` and `role="slider"`.
Also, revealing it on focus has proven over time to be very fragile and to cause
unexpected layout issues.

See #30281.
Fixes #40707.

Built from https://develop.svn.wordpress.org/trunk@40642


git-svn-id: http://core.svn.wordpress.org/trunk@40503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 22:29:42 +00:00
Weston Ruter
26a5058f43 Widgets: Utilize WP REST API oEmbed proxy endpoint in media widgets.
Props timmydcrawford.
See #32417, #40450.

Built from https://develop.svn.wordpress.org/trunk@40641


git-svn-id: http://core.svn.wordpress.org/trunk@40502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 21:24:42 +00:00
Weston Ruter
31d4d81039 Widgets: Introduce media widgets for images, audio, and video with extensible base for additional media widgets in the future.
The last time a new widget was introduced, Vuvuzelas were a thing, Angry Birds started taking over phones, and WordPress stopped shipping with Kubrick. Seven years and 17 releases without new widgets have been enough, time to spice up your sidebar!

Props westonruter, melchoyce, obenland, timmydcrawford, adamsilverstein, gonom9, wonderboymusic, Fab1en, DrewAPicture, sirbrillig, joen, matias, samikeijonen, afercia, celloexpressions, designsimply, michelleweber, ranh, kjellr, karmatosed.
Fixes #32417, #39993, #39994, #39995.

Built from https://develop.svn.wordpress.org/trunk@40640


git-svn-id: http://core.svn.wordpress.org/trunk@40501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 21:11:44 +00:00
Pascal Birchler
763f09fb7e Upgrade/Install: After [40638], make sure wp_is_file_mod_allowed() actually returns the right value.
See #38673.


Built from https://develop.svn.wordpress.org/trunk@40639


git-svn-id: http://core.svn.wordpress.org/trunk@40500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:54:43 +00:00
Pascal Birchler
33047ba14e Upgrade/Install: After [40394], rename wp_disallow_file_mods() to wp_is_file_mod_allowed().
This makes it more clear what this function is about.

Props Mte90.
Fixes #38673.

Built from https://develop.svn.wordpress.org/trunk@40638


git-svn-id: http://core.svn.wordpress.org/trunk@40499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:24:41 +00:00
Dominik Schilling
77858f4b92 KSES: Support 'tag' => true as a shorthand for 'tag' => array() in wp_kses_attr().
`Automatic_Upgrader_Skin::feedback()` had always assumed that this is already the case, now it is.

See #20017.
Fixes #40680.
Built from https://develop.svn.wordpress.org/trunk@40637


git-svn-id: http://core.svn.wordpress.org/trunk@40498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:23:43 +00:00
Pascal Birchler
9af735e863 Themes: Avoid PHP warnings in the admin when no theme directory exists.
Props iseulde, chris_dev, swissspidy.
Fixes #35521.

Built from https://develop.svn.wordpress.org/trunk@40636


git-svn-id: http://core.svn.wordpress.org/trunk@40497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:21:44 +00:00
Pascal Birchler
0b1e3a05f7 Posts, Post Types: Add initial tests for get_post_type_labels().
See #38218.
Fixes #38157.

Built from https://develop.svn.wordpress.org/trunk@40635


git-svn-id: http://core.svn.wordpress.org/trunk@40496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:19:42 +00:00
Pascal Birchler
fc1350ebe5 Administration: Ensure validateForm also validates other input fields.
With this change, textareas and select inputs will be checked as well.

Props shadyvb.
Fixes #37540.

Built from https://develop.svn.wordpress.org/trunk@40634


git-svn-id: http://core.svn.wordpress.org/trunk@40495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:18:42 +00:00
Dominik Schilling
0cd74a6d6e Plugins: Don't strip line breaks and blockquote elements in the plugin information modal.
Fixes #40679.
Built from https://develop.svn.wordpress.org/trunk@40633


git-svn-id: http://core.svn.wordpress.org/trunk@40494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:16:42 +00:00
Pascal Birchler
c000e99d6f Mail: Ensure entities are decoded in email change notifications on Multisite.
Adds new tests to ensure this bug does not pop up again.

Props stephenharris.
Fixes #40015.

Built from https://develop.svn.wordpress.org/trunk@40632


git-svn-id: http://core.svn.wordpress.org/trunk@40493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:15:44 +00:00
Weston Ruter
40ebb188cd Widgets: Extend the Text widget with TinyMCE.
Introduces rich text formatting: bold, italic, lists, links.

Props westonruter, azaozz, timmydcrawford, obenland, melchoyce.
See #35760.
Fixes #35243.

Built from https://develop.svn.wordpress.org/trunk@40631


git-svn-id: http://core.svn.wordpress.org/trunk@40492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 18:55:43 +00:00
James Nylen
8561cb0516 REST API: Update wp-api.js fixtures after string changes.
See #39178.

Built from https://develop.svn.wordpress.org/trunk@40630


git-svn-id: http://core.svn.wordpress.org/trunk@40491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 18:41:41 +00:00
James Nylen
ace96e26aa REST API: Tests: Remove and prohibit errors when generating wp-api.js fixtures.
During a PHPUnit test suite run, a file named `wp-api-generated.js` is created which contains some response objects that serve as fixtures for the `wp-api.js` client unit tests.

Previously, some of these API responses were actually error objects, which isn't what we want for testing.  This commit fixes the existing error responses and prevents this situation in the future.

Fixes #40734.


Built from https://develop.svn.wordpress.org/trunk@40629


git-svn-id: http://core.svn.wordpress.org/trunk@40490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 18:32:43 +00:00
James Nylen
589c4b4b2d REST API: Add endpoint for proxying requests to external oEmbed providers.
This endpoint is a prerequisite for the media widgets work (see https://github.com/xwp/wp-core-media-widgets).

Also use the new endpoint in the media modal instead of the `parse-embed` AJAX action.

Props westonruter, timmydcrawford, swissspidy, jnylen0.
Fixes #40450.

Built from https://develop.svn.wordpress.org/trunk@40628


git-svn-id: http://core.svn.wordpress.org/trunk@40489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 18:18:46 +00:00
Weston Ruter
2353930f90 Customize: Wait for processing state to clear before starting to captureSettingModifiedDuringSave.
See #32941.
Fixes #40729.

Built from https://develop.svn.wordpress.org/trunk@40627


git-svn-id: http://core.svn.wordpress.org/trunk@40488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 06:42:43 +00:00
Peter Wilson
746edb23f2 Emoji: Update Twemoji to version 2.2.5
Updates Twemoji and adds a second Emoji 4 test to include a shrugging man. Emoji 4 is being implemented gradually, while some browsers now support the female technologist, the indifferent shrugging man is breaking things with his presence.

Props peterwilsoncc, pento for code review.
Fixes #40615.

Built from https://develop.svn.wordpress.org/trunk@40626


git-svn-id: http://core.svn.wordpress.org/trunk@40487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 04:26:41 +00:00
Andrew Ozz
57ef33fa2a Editor: manually trigger change event when text is modified from JS.
Props westonruter.
Fixes #40726.
Built from https://develop.svn.wordpress.org/trunk@40615


git-svn-id: http://core.svn.wordpress.org/trunk@40485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 00:29:41 +00:00
Gary Pendergast
59c721dda0 Build/Test: Revert that failing test.
Now that Travis has confirmed that it is sending messages to Slack when a test fails, we no longer need a failing test.

The failing test added in [40613] is reverted, as Travis has failed to fail at notifying us about failing tests.

See #40712.


Built from https://develop.svn.wordpress.org/trunk@40614


git-svn-id: http://core.svn.wordpress.org/trunk@40484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 00:16:41 +00:00
Gary Pendergast
33e2f5fe9a Build/Test: Add an intentionally failing test.
To ensure that Travis is sending messages to Slack, a test needs to fail, so here's a failing test.

This failing test (and no other failing tests) will be reverted once Travis confirms that it isn't failing to message Slack about failing tests.

See #40712.


Built from https://develop.svn.wordpress.org/trunk@40613


git-svn-id: http://core.svn.wordpress.org/trunk@40483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 23:37:43 +00:00
Felix Arntz
0f4725a0e3 Multisite: Adjust site count of the correct network after having created a new site.
Prior to this change, after creating a site, the network site count was always refreshed on the current network, regardless of whether the site was created on a different network. With the recent changes, particularly [40591], it is now possible to update the site count for a specific `$network_id`, so this changeset makes use of the new parameter.

Fixes #38699.

Built from https://develop.svn.wordpress.org/trunk@40612


git-svn-id: http://core.svn.wordpress.org/trunk@40482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 23:22:42 +00:00
Felix Arntz
5310efaf61 Multisite: Fix usage of incorrect site_count network option name in unit tests.
The unit tests introduced as part of [40486] used the wrong `site_count` network option name instead of `blog_count`. This did not cause actual issues in the tests, but deleting the option was supposed to verify that it is properly recreated afterwards. The usage of the wrong name made these tests less useful, so this changeset fixes it.

Fixes #40725.

Built from https://develop.svn.wordpress.org/trunk@40611


git-svn-id: http://core.svn.wordpress.org/trunk@40481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 23:13:41 +00:00
Felix Arntz
051f291861 Multisite: Fix unstable unit test for get_blog_count().
The unit test introduced in [40370] used the strict `assertSame()` check while comparison a count with the value of an option, which under most conditions is not an integer. While the test passed on some setups, it failed on others. This changeset ensures that `assertEquals()` is used to make the test stable.

Fixes #40724.

Built from https://develop.svn.wordpress.org/trunk@40610


git-svn-id: http://core.svn.wordpress.org/trunk@40480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 23:03:43 +00:00
Peter Wilson
6c23b4750c Emoji: Clear canvas between flag tests.
Clear the canvas following the two flag tests following [40582].

Fixes #40616.


Built from https://develop.svn.wordpress.org/trunk@40609


git-svn-id: http://core.svn.wordpress.org/trunk@40479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 22:44:40 +00:00
Weston Ruter
7349c22b73 Customize: Fix clearing of fresh_site option flag when editing sidebars on widgets admin screen.
Amends [38991].
See #38114, #38533.
Fixes #40722.

Built from https://develop.svn.wordpress.org/trunk@40608


git-svn-id: http://core.svn.wordpress.org/trunk@40478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 21:25:41 +00:00
Andrew Ozz
b952bf4eae Dashboard: Update the existing WordPress News dashboard widget to also include upcoming meetup events and WordCamps near the current user’s location.
Props @afercia, @andreamiddleton, @azaozz, @camikaos, @coreymckrill, @chanthaboune, @courtneypk, @dd32, @iandunn, @iseulde, @mapk, @mayukojpn, @melchoyce, @nao, @obenland, @pento, @samuelsidler, @stephdau, @tellyworth.
See #40702.
Built from https://develop.svn.wordpress.org/trunk@40607


git-svn-id: http://core.svn.wordpress.org/trunk@40477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 20:04:42 +00:00
James Nylen
802c923873 REST API: Improve a few more strings added after the 4.7 string freeze.
See #39178.

See also #40720 for potential follow-up steps.

Built from https://develop.svn.wordpress.org/trunk@40606


git-svn-id: http://core.svn.wordpress.org/trunk@40476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 19:41:41 +00:00
James Nylen
7d337c1327 REST API: Add author, modified, and parent sort order options for posts.
These (and a few others that can be revisited later if needed) were present in
beta versions of the WP REST API but were removed during the merge to WP 4.7.

Props ChopinBach, jnylen0.
Fixes #38693.

Built from https://develop.svn.wordpress.org/trunk@40605


git-svn-id: http://core.svn.wordpress.org/trunk@40475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 18:52:44 +00:00
Gary Pendergast
30bdd11fd5 Build/Test: Post Travis results to Slack from WordPress/wordpress-develop
Now that the `WordPress/wordpress-develop` GitHub repo is syncing correctly, we can use it for Travis integration.

Props jorbin for getting the ball rolling so long ago, unprops jorbin because his Travis build can finally be retired.

Fixes #40712.


Built from https://develop.svn.wordpress.org/trunk@40604


git-svn-id: http://core.svn.wordpress.org/trunk@40474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 10:29:44 +00:00
Ryan McCue
3ecfb4b222 Options/Meta: Document valid types for registration.
In 4.7, the REST API introduced types for options and meta passed into the registration functions. This adds the documentation for those types.

Props iandunn, priyankabehera155.
Fixes #40318.

Built from https://develop.svn.wordpress.org/trunk@40603


git-svn-id: http://core.svn.wordpress.org/trunk@40473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 06:10:43 +00:00
Ryan McCue
131518542e REST API: Include featured_media in embed responses.
Props kadamwhite, jnylen0, westonruter.
Fixes #39805.

Built from https://develop.svn.wordpress.org/trunk@40602


git-svn-id: http://core.svn.wordpress.org/trunk@40472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 04:46:43 +00:00
Ryan McCue
ba94bd62a0 REST API: Set global $post when preparing revisions.
For compatibility with filters on hooks on content filters (such as shortcodes), we need to set the global. This mirrors the Posts controller.

Props pdufour, jnylen0.
Fixes #40626.

Built from https://develop.svn.wordpress.org/trunk@40601


git-svn-id: http://core.svn.wordpress.org/trunk@40471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 04:32:39 +00:00
Ryan McCue
027e8d9218 REST API: Allow "Origin: null" from file: URLs.
Browsers send an "Origin: null" header value for file and data URLs, as they can be generated by any document, and their origin is not guaranteed. Since we want to allow any URL to access the API (intentionally disabling the CORS protections), we need to special-case the non-URL "null" value.

Props joehoyle.
Fixes #40011.

Built from https://develop.svn.wordpress.org/trunk@40600


git-svn-id: http://core.svn.wordpress.org/trunk@40470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 04:22:43 +00:00
Andrew Ozz
19ed296008 Editor: Update wp.editor.remove() to use the new Quicktags instance removep().
Fixes: #35760
Built from https://develop.svn.wordpress.org/trunk@40599


git-svn-id: http://core.svn.wordpress.org/trunk@40469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 02:50:44 +00:00
Andrew Ozz
0b2f789e93 Editor: Add init and remove methods to Quicktags.
Props helgatheviking azaozz.
Fixes #26183 #40708.
Built from https://develop.svn.wordpress.org/trunk@40598


git-svn-id: http://core.svn.wordpress.org/trunk@40468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 02:47:42 +00:00
Mike Schroder
391145df30 Media: Optionally return attachment id from media_sideload_image().
Introduces option to `$return` parameter to return the attachment id created after a successful image sideload.

Props slbmeh, kawauso, alexkingorg, SergeyBiryukov, georgestephanis, DrewAPicture, nacin, trepmal, mattheu, kraftbj, whyisjake, dotancohen, MrGregWaugh, danielbachhuber.
Fixes #19629.
Built from https://develop.svn.wordpress.org/trunk@40597


git-svn-id: http://core.svn.wordpress.org/trunk@40467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 23:26:42 +00:00
Felix Arntz
d5ae7e682e Multisite: Fix filter hooks for the updating network count functions.
[40591] and [40593] introduced a `$network_id` parameter for `wp_maybe_update_network_site_counts()` and `wp_maybe_update_network_user_counts()`, as well as [40486] previously added it to `wp_update_network_counts()`. This changeset ensures the filter hooks in `ms-default-filters.php` do not pass any parameter to them that might conflict with their actual `$network_id` parameter, which caused unit test failures before.

Fixes #40703.

Built from https://develop.svn.wordpress.org/trunk@40596


git-svn-id: http://core.svn.wordpress.org/trunk@40466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 17:15:43 +00:00
Jeremy Felt
5b3d397133 Multisite: Check only valid looking emails against banned domain list.
If an email address is missing an `@`, we can't assume enough to check it against a list of domain names.

Additional validation of email should happen in `is_email()` before being passed to `is_email_address_unsafe()`.

Fixes #39915.

Built from https://develop.svn.wordpress.org/trunk@40595


git-svn-id: http://core.svn.wordpress.org/trunk@40465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 16:55:40 +00:00
Jeremy Felt
3600dc562e Multisite: Validate email before checking against banned domains.
Previously, an invalid email could result in an undefined index when attempting to determine the email domain.

Props ocean90.
See #39915.

Built from https://develop.svn.wordpress.org/trunk@40594


git-svn-id: http://core.svn.wordpress.org/trunk@40464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 16:33:46 +00:00
Felix Arntz
d92dbd24fc Multisite: Add $network_id parameter to wp_maybe_update_network_user_counts().
This allows calling the function for a specific network correctly, for example after a user has been created for it or been removed from it.

Fixes #40385. See #38699.

Built from https://develop.svn.wordpress.org/trunk@40593


git-svn-id: http://core.svn.wordpress.org/trunk@40463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 16:08:43 +00:00
Felix Arntz
314f2aecec Multisite: Add missing documentation for new $network_id parameter of wp_maybe_update_network_site_counts().
This was overlooked in [40591].

See #40384.

Built from https://develop.svn.wordpress.org/trunk@40592


git-svn-id: http://core.svn.wordpress.org/trunk@40462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 16:02:46 +00:00
Felix Arntz
93b8b9bb4e Multisite: Add $network_id parameter to wp_maybe_update_network_site_counts().
This allows calling the function for a specific network correctly, for example after a site has been created for it or been removed from it.

Fixes #40384. See #38699.

Built from https://develop.svn.wordpress.org/trunk@40591


git-svn-id: http://core.svn.wordpress.org/trunk@40461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 16:00:44 +00:00
Felix Arntz
039d49a68a Multisite: Add $network_id parameter to wp_is_large_network().
Now that `get_blog_count()` and `get_user_count()` both support passing a `$network_id` parameter (see [40370] and [40371]), similar functionality is now available for `wp_is_large_network()`. In addition, the filter `wp_is_large_network` now accepts the network ID as its fourth parameter.

This changeset furthermore introduces unit tests for the `wp_is_large_network()` function and its filter.

Fixes #40489.

Built from https://develop.svn.wordpress.org/trunk@40590


git-svn-id: http://core.svn.wordpress.org/trunk@40460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 15:51:47 +00:00
Felix Arntz
a3797875bf Multisite: Introduce minimum_site_name_length filter.
Prior to this change, the minimum site name length checked in `wpmu_validate_blog_signup()` was set to a fixed value of 4. The new filter allows tweaking this value, as there may be cases where shorter site names may be required.

Fixes #39676.

Built from https://develop.svn.wordpress.org/trunk@40589


git-svn-id: http://core.svn.wordpress.org/trunk@40459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 14:59:47 +00:00
Andrew Ozz
cbf3b2cff5 Editor: Add wp.editor.remove() for editors that were dynamically instantiated from JS.
Fixes: #35760
Built from https://develop.svn.wordpress.org/trunk@40588


git-svn-id: http://core.svn.wordpress.org/trunk@40458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 03:41:42 +00:00
Andrew Ozz
ec622956c8 TinyMCE: improve adding of custom UI to the MCE Factory.
Props iseulde.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40587


git-svn-id: http://core.svn.wordpress.org/trunk@40457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 01:40:46 +00:00
Andrea Fercia
cc9d3cfbb3 Themes: Fix missing search field in the Theme Install screen after [40572].
Props desrosj, cristianozanca for reporting.
Fixes #34881.

Built from https://develop.svn.wordpress.org/trunk@40586


git-svn-id: http://core.svn.wordpress.org/trunk@40456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 15:59:44 +00:00
Andrew Ozz
d7c32f6937 Fix linting errors in tinymce-obsolete.js.
See #40690.
Built from https://develop.svn.wordpress.org/trunk@40585


git-svn-id: http://core.svn.wordpress.org/trunk@40455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 06:06:42 +00:00
Andrew Ozz
122cf8b8d3 TinyMCE: remove the pre-4.6.0 tests. Move regression testing for obsolete tags and attributes to the default QUnit tests.
See #40690.
Built from https://develop.svn.wordpress.org/trunk@40584


git-svn-id: http://core.svn.wordpress.org/trunk@40454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:37:14 +00:00
Andrew Ozz
dd0d110520 TinyMCE: update to 4.6.0. Has many new features and bug fixes, changelog: https://www.tinymce.com/docs/changelog/#version460-may42017.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40583


git-svn-id: http://core.svn.wordpress.org/trunk@40453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:32:46 +00:00
Gary Pendergast
1b85aa404d Emoji: Make the UN flag test more accurate.
Previously, the UN flag test relied on the image being produced to be quite small. Unfortunately, the Chrome PNG encoder seems to have changed recently, and it now produces a relatively large image.

For a better test, we can compare the rendering of [U] + [N] against [U] + zero width space + [N].

Fixes #40616.


Built from https://develop.svn.wordpress.org/trunk@40582


git-svn-id: http://core.svn.wordpress.org/trunk@40452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:04:52 +00:00
John Blackbourn
127abe718b Users: Correct a permission check when showing the User item in the + New admin toolbar menu.
Props dlh
Fixes #39252

Built from https://develop.svn.wordpress.org/trunk@40581


git-svn-id: http://core.svn.wordpress.org/trunk@40451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 17:42:45 +00:00
John Blackbourn
9c7c11f268 Users: Clear the user settings cookies when clearing auth cookies.
This prevents lingering cookies when logging out and when switching between user accounts.

Props soulseekah, shanee
Fixes #32567

Built from https://develop.svn.wordpress.org/trunk@40580


git-svn-id: http://core.svn.wordpress.org/trunk@40450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 16:54:42 +00:00
Andrea Fercia
98402b7c15 Administration: Restore missing spinner when installing a new language.
Fixes #40478.

Built from https://develop.svn.wordpress.org/trunk@40579


git-svn-id: http://core.svn.wordpress.org/trunk@40449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 12:01:42 +00:00
Andrea Fercia
fe96a729a0 Accessibility: Make the Get Shortlink button be a real button.
Worth noting, as of WordPress 4.4, the Get Shortlink button is hidden by default
but it can be restored via filters.

Props Cheffheid.
See #26504.
Fixes #40448.

Built from https://develop.svn.wordpress.org/trunk@40578


git-svn-id: http://core.svn.wordpress.org/trunk@40448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 11:47:41 +00:00
Joe Hoyle
b0a327cf3c REST API: WP_REST_Request::remove_header() should canonicalize header names.
When headers are stored in WP_REST_Request internally they are canonicalized. This step already happens on setting / getting headers in any way, but was missed when implementing remove_header().

Props TimothyBlynJacobs.
Fixes #40347.

Built from https://develop.svn.wordpress.org/trunk@40577


git-svn-id: http://core.svn.wordpress.org/trunk@40447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-07 04:09:41 +00:00
Pascal Birchler
7fd55738be Administration: Remove unit and prefixed version from a CSS declaration.
The prefixed version gets added by Autoprefixer already.

Props MatheusFD.
Fixes #35358.

Built from https://develop.svn.wordpress.org/trunk@40576


git-svn-id: http://core.svn.wordpress.org/trunk@40446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-06 14:37:44 +00:00
Pascal Birchler
064e62cbea Cron API: Add a new wp_doing_cron() helper function.
This replaces `DOING_CRON` checks via the constant.

Props tfrommen.
Fixes #39591.

Built from https://develop.svn.wordpress.org/trunk@40575


git-svn-id: http://core.svn.wordpress.org/trunk@40445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-06 14:30:40 +00:00
Pascal Birchler
e1d5fd1c6b Embeds: Add screencast.com to oEmbed provider whitelist.
Props ENDif Media.
Fixes #38367.

Built from https://develop.svn.wordpress.org/trunk@40574


git-svn-id: http://core.svn.wordpress.org/trunk@40444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-06 14:25:45 +00:00
Andrea Fercia
88e515fac0 Accessibility: Improve the suggested image size text in the media views.
Adds `pixels` as unit, avoiding abbreviation for a clearer pronunciation by screen
readers. Also, adds the word `by` instead of the special character `times`.

Props Presskopp, stormrockwell.
Fixes #38932.

Built from https://develop.svn.wordpress.org/trunk@40573


git-svn-id: http://core.svn.wordpress.org/trunk@40443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 23:29:44 +00:00
Andrea Fercia
471f1e7201 Accessibility: Wrap the installed themes search field within a form element.
Valid code is important not just to formally meet the specification, but also to
ensure user agents, including assistive technologies, can accurately interpret
and parse content. When HTML elements are not used in the recommended way,
user agents may render them in unexpected ways. It can also become a problem for
compatibility with older or even future browsers, devices, or other software.
See W3C WCAG 4.1.1.

Props takayukister, aryamaaru.
Fixes #34881.

Built from https://develop.svn.wordpress.org/trunk@40572


git-svn-id: http://core.svn.wordpress.org/trunk@40442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 19:02:45 +00:00
Adam Silverstein
428afdaa5a REST API: Improve strings added after 4.7 string freeze.
Clarify the `rest_orderby_include_missing_include` error message.

Props PranaliPatel.
Fixes #39178.

Built from https://develop.svn.wordpress.org/trunk@40571


git-svn-id: http://core.svn.wordpress.org/trunk@40441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 18:49:47 +00:00
Andrea Fercia
3dab32af54 Accessibility: Improve the color contrast ratio of the dismiss notice buttons.
Props chris_dev.
Fixes #39970.

Built from https://develop.svn.wordpress.org/trunk@40570


git-svn-id: http://core.svn.wordpress.org/trunk@40440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-04 22:32:46 +00:00
Andrea Fercia
3c7698808f 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.

Built from https://develop.svn.wordpress.org/trunk@40569


git-svn-id: http://core.svn.wordpress.org/trunk@40439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-03 22:39:44 +00:00
Andrea Fercia
1ca3b70929 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.

Built from https://develop.svn.wordpress.org/trunk@40568


git-svn-id: http://core.svn.wordpress.org/trunk@40436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-02 20:03:42 +00:00
Weston Ruter
91a8af0ef6 Customize: Allow select dropdowns to stretch full width in widened controls pane.
Props timmydcrawford.
Amends [40511].
Fixes #32296.

Built from https://develop.svn.wordpress.org/trunk@40567


git-svn-id: http://core.svn.wordpress.org/trunk@40435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-02 19:30:46 +00:00
Sergey Biryukov
4995062686 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.
Built from https://develop.svn.wordpress.org/trunk@40565


git-svn-id: http://core.svn.wordpress.org/trunk@40434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-01 23:32:42 +00:00
John Blackbourn
42845bcb2d 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

Built from https://develop.svn.wordpress.org/trunk@40564


git-svn-id: http://core.svn.wordpress.org/trunk@40433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-01 20:35:44 +00:00
John Blackbourn
282408b6c0 Users: Add two missing special cases to the capability tests for non-logged-in users.
Also updates a `expectedIncorrectUsage` notation.

See #37405

Built from https://develop.svn.wordpress.org/trunk@40563


git-svn-id: http://core.svn.wordpress.org/trunk@40432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-01 16:19:44 +00:00
John Blackbourn
d24f1f5864 Build/Test Tools: Pin the WordPress Importer plugin to version 0.6.3 when testing on Travis.
Fixes #40620

Built from https://develop.svn.wordpress.org/trunk@40562


git-svn-id: http://core.svn.wordpress.org/trunk@40431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-01 11:30:43 +00:00
John Blackbourn
d1647d0b8c Build/Test Tools: Add object-cache.php to the unit test suite.
This removes an unnecessary external dependency from the Travis tests.

Fixes #40619

Built from https://develop.svn.wordpress.org/trunk@40561


git-svn-id: http://core.svn.wordpress.org/trunk@40430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-01 11:21:44 +00:00
John Blackbourn
eb4db0e19c 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

Built from https://develop.svn.wordpress.org/trunk@40560


git-svn-id: http://core.svn.wordpress.org/trunk@40429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-30 13:03:41 +00:00
John Blackbourn
224b88ca42 Posts, Post Types: Revert [40558] pending investigation.
See #18375

Built from https://develop.svn.wordpress.org/trunk@40559


git-svn-id: http://core.svn.wordpress.org/trunk@40428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-30 11:19:45 +00:00
John Blackbourn
53acb5b6d4 Posts, Post Types: Correct the attachment post type template unit test introduced in [38951].
Also adds additional assertions for the templates.

See #18375

Built from https://develop.svn.wordpress.org/trunk@40558


git-svn-id: http://core.svn.wordpress.org/trunk@40427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-29 21:16:45 +00:00
Boone Gorges
fb0a08c8be 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.
Built from https://develop.svn.wordpress.org/trunk@40557


git-svn-id: http://core.svn.wordpress.org/trunk@40426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-27 16:23:47 +00:00
Andrea Fercia
f1be128cde 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.

Built from https://develop.svn.wordpress.org/trunk@40556


git-svn-id: http://core.svn.wordpress.org/trunk@40425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-25 16:42:44 +00:00
John Blackbourn
d3c74e8ce9 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

Built from https://develop.svn.wordpress.org/trunk@40555


git-svn-id: http://core.svn.wordpress.org/trunk@40424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-24 01:23:43 +00:00
John Blackbourn
89b358082e Build/Test Tools: Remove HHVM from the test infrastructure on Travis.
Fixes #40548

Built from https://develop.svn.wordpress.org/trunk@40546


git-svn-id: http://core.svn.wordpress.org/trunk@40422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-24 00:28:44 +00:00
John Blackbourn
79ca3ca178 REST API: Remove a useless unit test.
See #35907, #38373

Built from https://develop.svn.wordpress.org/trunk@40545


git-svn-id: http://core.svn.wordpress.org/trunk@40421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 22:20:41 +00:00
John Blackbourn
37aed623c0 Build/Test Tools: Remove more unnecessary test skipping when erroneous situations occur.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40544


git-svn-id: http://core.svn.wordpress.org/trunk@40420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 22:12:42 +00:00
John Blackbourn
1ad93e1db9 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

Built from https://develop.svn.wordpress.org/trunk@40543


git-svn-id: http://core.svn.wordpress.org/trunk@40419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 21:58:41 +00:00
John Blackbourn
29b3932430 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

Built from https://develop.svn.wordpress.org/trunk@40542


git-svn-id: http://core.svn.wordpress.org/trunk@40418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 21:35:41 +00:00
John Blackbourn
0ec1f5aadf 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

Built from https://develop.svn.wordpress.org/trunk@40541


git-svn-id: http://core.svn.wordpress.org/trunk@40417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 21:29:43 +00:00
Sergey Biryukov
2e6e53d26f Help/About: Fix typo in help text on Reading Settings screen.
Props Arena94, bhargavbhandari90.
Fixes #40530.
Built from https://develop.svn.wordpress.org/trunk@40540


git-svn-id: http://core.svn.wordpress.org/trunk@40416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 14:34:42 +00:00
John Blackbourn
975d00bd54 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

Built from https://develop.svn.wordpress.org/trunk@40539


git-svn-id: http://core.svn.wordpress.org/trunk@40415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 11:46:42 +00:00
John Blackbourn
36c977b9b1 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

Built from https://develop.svn.wordpress.org/trunk@40538


git-svn-id: http://core.svn.wordpress.org/trunk@40414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 11:40:43 +00:00
Peter Wilson
717de16c68 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.

Built from https://develop.svn.wordpress.org/trunk@40537


git-svn-id: http://core.svn.wordpress.org/trunk@40413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 07:16:43 +00:00
John Blackbourn
812ac18853 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

Built from https://develop.svn.wordpress.org/trunk@40536


git-svn-id: http://core.svn.wordpress.org/trunk@40412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 02:06:40 +00:00
John Blackbourn
6bcec554c3 Build/Test Tools: Ensure that WP_UnitTestCase::expectedDeprecated() performs an assertion to avoid risky test notices.
See #40538

Built from https://develop.svn.wordpress.org/trunk@40535


git-svn-id: http://core.svn.wordpress.org/trunk@40411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 01:45:43 +00:00
John Blackbourn
3b24784333 Build/Test Tools: Be strict about tests that do not test anything.
See #40538

Built from https://develop.svn.wordpress.org/trunk@40534


git-svn-id: http://core.svn.wordpress.org/trunk@40410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-23 01:25:42 +00:00
John Blackbourn
6e4b6591d8 Build/Test Tools: Remove unnecessary checks and skips that should instead cause failures if they ever fail.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40533


git-svn-id: http://core.svn.wordpress.org/trunk@40409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 22:55:40 +00:00
John Blackbourn
fe06ac7e39 Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40532


git-svn-id: http://core.svn.wordpress.org/trunk@40408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 22:12:41 +00:00
John Blackbourn
f1fff0b06e Build/Test Tools: Convert more test skipping into hard failures. These dependencies should all be present when testing.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40531


git-svn-id: http://core.svn.wordpress.org/trunk@40407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 22:01:42 +00:00
John Blackbourn
af587d874d Build/Test Tools: Correct an incorrect ms- group name.
See #40531

Built from https://develop.svn.wordpress.org/trunk@40530


git-svn-id: http://core.svn.wordpress.org/trunk@40406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 21:44:42 +00:00
John Blackbourn
e76e3d459a Build/Test Tools: Partially revert [40524].
See #40533, #40535

Built from https://develop.svn.wordpress.org/trunk@40529


git-svn-id: http://core.svn.wordpress.org/trunk@40405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 21:22:43 +00:00
John Blackbourn
69bb8fa5c9 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

Built from https://develop.svn.wordpress.org/trunk@40528


git-svn-id: http://core.svn.wordpress.org/trunk@40404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 21:01:42 +00:00
John Blackbourn
ba88762aa3 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

Built from https://develop.svn.wordpress.org/trunk@40527


git-svn-id: http://core.svn.wordpress.org/trunk@40403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 20:25:39 +00:00
John Blackbourn
7696954d91 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

Built from https://develop.svn.wordpress.org/trunk@40526


git-svn-id: http://core.svn.wordpress.org/trunk@40402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 20:18:42 +00:00
John Blackbourn
0371277d5a 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

Built from https://develop.svn.wordpress.org/trunk@40525


git-svn-id: http://core.svn.wordpress.org/trunk@40401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 20:13:42 +00:00
John Blackbourn
1cbc2c3857 Build/Test Tools: Remove more skipped tests that should actually be failures if their conditions aren't satisfied.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40524


git-svn-id: http://core.svn.wordpress.org/trunk@40400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 19:43:41 +00:00
John Blackbourn
a0e67d3e16 Build/Test Tools: Remove ancient UT ticket handling.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40523


git-svn-id: http://core.svn.wordpress.org/trunk@40399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 19:39:43 +00:00
John Blackbourn
f12c419ee3 Build/Test Tools: Add some more tests to the ms-required and ms-excluded groups.
See #40531

Built from https://develop.svn.wordpress.org/trunk@40522


git-svn-id: http://core.svn.wordpress.org/trunk@40398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 19:22:44 +00:00
John Blackbourn
af6c8d1bc6 Build/Test Tools: Remove a useless test.
See #33898, #40533

Built from https://develop.svn.wordpress.org/trunk@40521


git-svn-id: http://core.svn.wordpress.org/trunk@40397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 19:10:43 +00:00
John Blackbourn
17b73338f1 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

Built from https://develop.svn.wordpress.org/trunk@40520


git-svn-id: http://core.svn.wordpress.org/trunk@40396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 18:59:41 +00:00
John Blackbourn
ed1d714572 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

Built from https://develop.svn.wordpress.org/trunk@40519


git-svn-id: http://core.svn.wordpress.org/trunk@40395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 18:45:40 +00:00
John Blackbourn
aa8f871f21 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

Built from https://develop.svn.wordpress.org/trunk@40518


git-svn-id: http://core.svn.wordpress.org/trunk@40394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 18:26:42 +00:00
John Blackbourn
dd0346b330 Canonical: Don't skip tests if the test data is invalid.
See #40533

Built from https://develop.svn.wordpress.org/trunk@40517


git-svn-id: http://core.svn.wordpress.org/trunk@40393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 17:30:44 +00:00
John Blackbourn
8d3d439684 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

Built from https://develop.svn.wordpress.org/trunk@40516


git-svn-id: http://core.svn.wordpress.org/trunk@40392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 14:17:42 +00:00
Andrew Ozz
c7058c739d Editor: fix undefined var notice in editor_js() in class-wp-editor.php.
Props littler.chicken.
Fixes #40501, see #35760.
Built from https://develop.svn.wordpress.org/trunk@40515


git-svn-id: http://core.svn.wordpress.org/trunk@40391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-22 01:12:44 +00:00
Boone Gorges
e45ee36b84 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.
Built from https://develop.svn.wordpress.org/trunk@40513


git-svn-id: http://core.svn.wordpress.org/trunk@40389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-21 19:14:44 +00:00
Weston Ruter
cc77899e7f Customize: Increase width of controls pane on large monitors to give more room.
Props celloexpressions, timmydcrawford.
Fixes #32296.

Built from https://develop.svn.wordpress.org/trunk@40511


git-svn-id: http://core.svn.wordpress.org/trunk@40387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-21 05:25:43 +00:00
Weston Ruter
9eb9cc40bd Customize: Fix visibility of "Hide Controls" link in IE.
Amends [39214].
Props timmydcrawford.
See #32296, #38762.
Fixes #40507.

Built from https://develop.svn.wordpress.org/trunk@40510


git-svn-id: http://core.svn.wordpress.org/trunk@40386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-21 05:16:45 +00:00
Felix Arntz
9c8bf59842 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.

Built from https://develop.svn.wordpress.org/trunk@40486


git-svn-id: http://core.svn.wordpress.org/trunk@40362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-20 00:27:42 +00:00
Felix Arntz
79be8dff6d 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.

Built from https://develop.svn.wordpress.org/trunk@40485


git-svn-id: http://core.svn.wordpress.org/trunk@40361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-20 00:14:43 +00:00
Felix Arntz
7fa610b34a 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.

Built from https://develop.svn.wordpress.org/trunk@40484


git-svn-id: http://core.svn.wordpress.org/trunk@40360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-20 00:00:42 +00:00
Sergey Biryukov
35987df4e4 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.
Built from https://develop.svn.wordpress.org/trunk@40483


git-svn-id: http://core.svn.wordpress.org/trunk@40359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 23:08:40 +00:00
Andrew Ozz
c0399b4fde TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur.
Props iseulde, azaozz.
Fixes #40480 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40481


git-svn-id: http://core.svn.wordpress.org/trunk@40357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 22:10:42 +00:00
Andrea Fercia
1d739a0925 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.

Built from https://develop.svn.wordpress.org/trunk@40480


git-svn-id: http://core.svn.wordpress.org/trunk@40356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 21:14:44 +00:00
Andrea Fercia
711796d172 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.

Built from https://develop.svn.wordpress.org/trunk@40479


git-svn-id: http://core.svn.wordpress.org/trunk@40355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 19:53:42 +00:00
Dominik Schilling
7977451301 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.
Built from https://develop.svn.wordpress.org/trunk@40478


git-svn-id: http://core.svn.wordpress.org/trunk@40354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 18:52:44 +00:00
Sergey Biryukov
ebf0b9e46e Editor: Define $suffix before using it in _WP_Editors::print_tinymce_scripts().
Props imath.
Fixes #40479. See #35760.
Built from https://develop.svn.wordpress.org/trunk@40477


git-svn-id: http://core.svn.wordpress.org/trunk@40353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 12:02:46 +00:00
Andrew Ozz
d0e4448257 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 02:38:44 +00:00
Pascal Birchler
c58cb3af9e Twenty Seventeen: Bump version and update the changelog.
Updates changelog to link to Codex pages, like other default themes.

Props swissspidy, davidakennedy.
Fixes #40461.

Built from https://develop.svn.wordpress.org/trunk@40472


git-svn-id: http://core.svn.wordpress.org/trunk@40348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-18 09:14:46 +00:00
Weston Ruter
cb6086ae9b 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.

Built from https://develop.svn.wordpress.org/trunk@40471


git-svn-id: http://core.svn.wordpress.org/trunk@40347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-18 00:31:43 +00:00
Pascal Birchler
e5c05e18a1 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.

Built from https://develop.svn.wordpress.org/trunk@40458


git-svn-id: http://core.svn.wordpress.org/trunk@40334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-17 10:09:43 +00:00
John Blackbourn
c2d7701a31 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

Built from https://develop.svn.wordpress.org/trunk@40434


git-svn-id: http://core.svn.wordpress.org/trunk@40332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-15 17:43:41 +00:00
John Blackbourn
1e9446310a Networks and Sites: Correct a capability check when accessing the Sites -> Add New screen.
Props flixos90

See #39156

Built from https://develop.svn.wordpress.org/trunk@40433


git-svn-id: http://core.svn.wordpress.org/trunk@40331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-15 17:30:48 +00:00
Sergey Biryukov
7ee5878a9c Docs: Update the length limit in set_site_transient() docs after [34030].
Props lukecavanagh, jdgrimes.
Fixes #40455.
Built from https://develop.svn.wordpress.org/trunk@40432


git-svn-id: http://core.svn.wordpress.org/trunk@40330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-15 09:28:43 +00:00
Adam Silverstein
9ff1301ae5 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.


Built from https://develop.svn.wordpress.org/trunk@40431


git-svn-id: http://core.svn.wordpress.org/trunk@40329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-14 16:43:44 +00:00
James Nylen
999c807b88 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.

Built from https://develop.svn.wordpress.org/trunk@40430


git-svn-id: http://core.svn.wordpress.org/trunk@40328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-14 11:25:43 +00:00
Pascal Birchler
38c4565187 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.

Built from https://develop.svn.wordpress.org/trunk@40428


git-svn-id: http://core.svn.wordpress.org/trunk@40326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-14 09:31:43 +00:00
Sergey Biryukov
9fb2e79b57 Posts, Post Types: In wp_check_post_lock(), check if the user with lock exists and return false otherwise.
Props arshidkv12, 1naveengiri.
Fixes #39888.
Built from https://develop.svn.wordpress.org/trunk@40424


git-svn-id: http://core.svn.wordpress.org/trunk@40322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 23:09:43 +00:00
Sergey Biryukov
bef3ff1377 Posts, Post Types: Improve the docs for wp_check_post_lock() and wp_set_post_lock().
See #39888.
Built from https://develop.svn.wordpress.org/trunk@40423


git-svn-id: http://core.svn.wordpress.org/trunk@40321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 23:02:42 +00:00
Sergey Biryukov
902b91400d Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.
Props rianrietveld.
Fixes #40185.
Built from https://develop.svn.wordpress.org/trunk@40422


git-svn-id: http://core.svn.wordpress.org/trunk@40320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 22:42:43 +00:00
James Nylen
7d8451ff70 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.

Built from https://develop.svn.wordpress.org/trunk@40421


git-svn-id: http://core.svn.wordpress.org/trunk@40319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-13 20:22:44 +00:00
Andrea Fercia
5599164cb7 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.

Built from https://develop.svn.wordpress.org/trunk@40418


git-svn-id: http://core.svn.wordpress.org/trunk@40316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-12 16:12:43 +00:00
John Blackbourn
c26a9a4478 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

Built from https://develop.svn.wordpress.org/trunk@40417


git-svn-id: http://core.svn.wordpress.org/trunk@40315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-12 14:59:44 +00:00
John Blackbourn
927bd9aeb8 Build/Test tools: Improve the failure message reported by assertQueryTrue() so it's a little less cryptic.
Fixes #40411

Built from https://develop.svn.wordpress.org/trunk@40416


git-svn-id: http://core.svn.wordpress.org/trunk@40314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-11 10:48:43 +00:00
Felix Arntz
45b64ba2ff 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.

Built from https://develop.svn.wordpress.org/trunk@40406


git-svn-id: http://core.svn.wordpress.org/trunk@40313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-10 22:00:43 +00:00