Commit Graph

24763 Commits

Author SHA1 Message Date
Pascal Birchler 078a63e049 Editor: In `_WP_Editors::wp_link_query`, allow filtering empty results.
Previously, it was not possible to hook into the `wp_link_query` filter to add custom entries when the 
query returned no posts.

Props mitraval192, msebel.
Fixes #41825.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 14:03:44 +00:00
John Blackbourn e061a432cc Embeds: Add the `dnt` (Do Not Track) query parameter to all oEmbed provider URLs.
This means that, for those providers that support this somewhat de-facto standard, visitor tracking is disabled by default for all embeds.

Props norcross, joostdevalk

Fixes #41784

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


git-svn-id: http://core.svn.wordpress.org/trunk@41178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 12:31:43 +00:00
Andrew Ozz ffa304135e Text widget: add the Add Media button and enable the `wpview` plugin to show embedded media previews in the editor.
Props westonruter, azaozz.
See #40854.
Built from https://develop.svn.wordpress.org/trunk@41344


git-svn-id: http://core.svn.wordpress.org/trunk@41177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 10:57:43 +00:00
Sergey Biryukov 8cfe233137 Twenty Sixteen: Replace inline control structureв to improve code readability.
Fixes #38468.
Built from https://develop.svn.wordpress.org/trunk@41343


git-svn-id: http://core.svn.wordpress.org/trunk@41176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 06:04:44 +00:00
Sergey Biryukov 6880400dd5 Twenty Seventeen: Correct the `@return` value for `twentyseventeen_post_thumbnail_sizes_attr()`.
Props truongwp.
Fixes #41830.
Built from https://develop.svn.wordpress.org/trunk@41342


git-svn-id: http://core.svn.wordpress.org/trunk@41175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 04:27:44 +00:00
Sergey Biryukov 15c38a8068 Twenty Sixteen: Correct the `@return` value for `twentysixteen_post_thumbnail_sizes_attr()`.
Props truongwp.
See #41830.
Built from https://develop.svn.wordpress.org/trunk@41341


git-svn-id: http://core.svn.wordpress.org/trunk@41174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 04:26:45 +00:00
Konstantin Obenland a1688f0d2a Widgets: Improve _doing_it_wrong message.
Adds more context to help sending developers on the path to success.

Props ramiy.
Fixes 41743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 21:32:43 +00:00
Weston Ruter d031a9c3fe Widgets: Use `word-wrap: break-word` for available widget descriptions.
Props metodiew.
Fixes #36207.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 18:28:43 +00:00
Weston Ruter 0391928790 Customize: Do not show `cursor: not-allowed` on audio/video track titles within playlists in preview.
Props scott.deluzio, mitraval192, westonruter.
See #31517.
Fixes #41489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-06 18:00:43 +00:00
Andrea Fercia 4c60dfa69b Themes: Prevent the Themes search field default action after [40572].
Props boonebgorges.
Fixes #41803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-05 17:26:45 +00:00
Dominik Schilling 401808ea96 I18N: Allow numbers in locales during installation.
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`.

Fixes #41794.
Built from https://develop.svn.wordpress.org/trunk@41335


git-svn-id: http://core.svn.wordpress.org/trunk@41166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 19:30:43 +00:00
Adam Silverstein ba0970ab28 WP-API JS Client: Add helpers to get a model or collection by route.
Add two new helper functions, `wp.api.getModelByRoute` and `wp.api.getCollectionByRoute`. Passed a route, they return the matching model or collection, or `undefined` if none is found.

Also adds tests to verify these functions work as expected.

Props rcutmore.
Fixes #41111.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 16:01:43 +00:00
John Blackbourn f66864af2e Multisite: More specificity for the `get_sites()` documentation.
See #41789

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


git-svn-id: http://core.svn.wordpress.org/trunk@41164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 11:17:43 +00:00
Andrew Ozz a93298f0c7 Plupload: remove the reinstated `plupload.js` from the list of old files.
Props afercia.
See #41755.
Built from https://develop.svn.wordpress.org/trunk@41332


git-svn-id: http://core.svn.wordpress.org/trunk@41163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 10:22:47 +00:00
Dominik Schilling 2526eb2d86 Multisite: Clarify return type of `get_sites()` when 'count' is passed as a query var.
Fixes #41789.
Built from https://develop.svn.wordpress.org/trunk@41331


git-svn-id: http://core.svn.wordpress.org/trunk@41162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 08:16:44 +00:00
Andrea Fercia c3cf5cb324 Docs: Update media-audiovideo.js after [41239].
Fixes #41602.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:16:43 +00:00
Andrea Fercia b43ddef0bc Accessibility: Improve the color picker UI accessibility, interaction, and generated markup.
- Refactors the UI controls around the Iris color picker to output valid and semantic markup
- Simplifies the way elements visibility gets toggled
- Properly associates the visually hidden label with the color input field
- Makes the toggle button a real button
- Adds `aria-expanded` to the toggle button
- Keeps focus on the toggle button instead of moving it to the color input field
- Adds `aria-label` attributes to give better context to some controls
- Removes a redundant title attribute
- Keeps the toggle button text to "Select Color" instead of changing it to "Current Color" when a color is selected
- Slightly improves the responsive view
- CSS clean-up

Fixes #39662.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:02:46 +00:00
Andrew Ozz e38ec0f485 Plupload:
- Update to 2.1.9.
- Include the non-minified plupload.js and moxie.js.
- Remove support for Flash and Silverlight, the available runtime options are `html5` and `html4`.
- Delete plupload.flash.swf and plupload.silverlight.xap.

Fixes #41755.
Built from https://develop.svn.wordpress.org/trunk@41328


git-svn-id: http://core.svn.wordpress.org/trunk@41159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-01 12:28:46 +00:00
Konstantin Obenland 564e13cf30 Widgets: Add nudge for registered widgets
Informs developers that widgets need to be registered before they can be
displayed through `the_widget()`. Previously it would fail with an ambiguous
undefined index notice.

Props SeBsZ, mrasharirfan.
Fixes #41743.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-01 08:50:47 +00:00
Dominik Schilling fff02086dd Taxonomy: Remove unused global imports for `$wpdb` in `get_terms()` and `wp_get_object_terms()`.
Also remove incorrect `@global` tags for `$wpdb` and `$wp_filter`.

Fixes #41768.
Built from https://develop.svn.wordpress.org/trunk@41326


git-svn-id: http://core.svn.wordpress.org/trunk@41157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-31 12:26:42 +00:00
Sergey Biryukov 320c289ec0 Media: Set correct value for "Link Rel" field in Image Details modal.
Props hazemnoor.
Fixes #41764.
Built from https://develop.svn.wordpress.org/trunk@41325


git-svn-id: http://core.svn.wordpress.org/trunk@41156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-31 11:17:45 +00:00
Felix Arntz 70daaadc6a Multisite: Remove an unnecessary if clause wrapping the `added_existing_user` filter.
This was accidentally introduced in [41125]. Since the `added_existing_user` filter has historically accepted either `true` or a `WP_Error` object, the clause is not necessary here. The doc block has been adjusted to account for the new possible `WP_Error` condition.

Fixes #41101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-30 19:53:45 +00:00
Joe McGill 682ec35fbc Media: Ensure 'media_handle_upload()' returns 'WP_Error' on failure.
This fixes an issue where failures when inserting the attachment post via
`wp_insert_attachment()` would result in a return value of `0` instead of a
`WP_Error` object, as documented. This is addressed by passing `true` as the 
fourth param (added in WP 4.7.0) when calling `wp_insert_attachment()`.

Props mrasharirfan, flixos90.
Fixes #41726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-30 15:04:48 +00:00
John Blackbourn d611184f4f Docs: Clarify descriptions and parameter types for various user capability checking functions.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-29 16:43:47 +00:00
Weston Ruter 1afaf8c605 Customize: Prevent potential cache corruption when finding a secondary changeset post by UUID.
Props dlh.
Fixes #41738.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-29 04:10:46 +00:00
Weston Ruter a979e17e2b Media: Upgrade MediaElement.js to `4.2.5-74e01a40` fixing missing `mejs.MediaElement` reference.
ALso fixes:

* Accessibility for volume control
* Progress bar tooltip positioning and dimensions correctly set for media with long duration
* Better codec checking
* Minor CSS fix to avoid flickering effect on volume control

Props rafa8626.
See #39686.
Fixes #41640.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-28 19:29:47 +00:00
Andrew Ozz c56801657a TinyMCE: fix cases where an additional empty link is created while updating an image with a link.
Props spocke.
Fixes #41259.
Built from https://develop.svn.wordpress.org/trunk@41319


git-svn-id: http://core.svn.wordpress.org/trunk@41150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-26 16:34:46 +00:00
Sergey Biryukov 98995d46d1 Formatting: In `sanitize_title_with_dashes()`, convert forward slash to hyphen on save.
Props corvidism, jtsternberg, GhostToast, alxndr.
Fixes #10792.
Built from https://develop.svn.wordpress.org/trunk@41318


git-svn-id: http://core.svn.wordpress.org/trunk@41149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 23:28:45 +00:00
Sergey Biryukov 00c88acb5e Docs: Correct description for `view_mode_post_types` filter added in [35357].
Props birgire.
Fixes #41730.
Built from https://develop.svn.wordpress.org/trunk@41317


git-svn-id: http://core.svn.wordpress.org/trunk@41148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 19:27:45 +00:00
iandunn 476377f64d Dashboard: Discontinue nonessential logging of Events API requests.
These log entries are only useful when troubleshooting unexpected results from the API, which is not common. The vast majority of users are better served by not having their logs cluttered with noise.

For the rare situations where troubleshooting is necessary, it can be achieved by a plugin (see #41217 for an example).

Props Howdy_McGee, dd32.
Fixes #41217.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 18:12:44 +00:00
Joe McGill bbb8d48086 Media: Prime post caches in 'wp_make_content_images_responsive()'.
In [38296] we replaced `get_post_meta()` with `wp_get_attachment_metadata()`
so that attachment metadata could be consistently filtered. However, this
results in extra post queries which were previously avoided.

This uses `_prime_post_caches()` instead of `update_meta_cache()` to improve
post caching before looping through all images to retrieve attachment metadata.

Props dlh.
Fixes #40490.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-25 16:16:46 +00:00
Scott Taylor 10177e7fbb Docs: improve JS docs for `comment-reply.js`
Props andizer, ireneyoast.
Fixes #41548.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:58:44 +00:00
Scott Taylor 4557e0d292 Docs: improve JS docs for `bookmarklet.js`
Props andizer, ireneyoast.
Fixes #41547.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:55:45 +00:00
Sergey Biryukov 33f0b56134 Widgets: Remove a duplicate `require_once()` for `class-wp-widget-meta.php` added in [40640].
Props thingsym.
Fixes #41723.
Built from https://develop.svn.wordpress.org/trunk@41312


git-svn-id: http://core.svn.wordpress.org/trunk@41143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:53:27 +00:00
Scott Taylor 55a180f063 Docs: improve JS docs for `tags.js`
Props atimmer, jipmoors.
Fixes #41069.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:52:44 +00:00
Scott Taylor 412d5e60be Docs: improve JS docs for `editor-expand.js`
Props IreneYoast, terwdan.
Fixes #41068.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:48:45 +00:00
Mel Choyce f10a6f8863 Widgets: Add grey background behind image widgets.
When an image in the image widget isn't full-width, it looks like it's floating. This adds a grey background behind images to help ground them in the widget.

Props mrasharirfan.
Fixes #41630.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-23 17:15:42 +00:00
Drew Jaynes fabca552aa Docs: Clarify the expected usage of the `$args` parameter as an array in the DocBlock for `apply_filters_deprecated()`, including an example.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-23 15:52:46 +00:00
John Blackbourn 9db227ac07 Build/Test tools: Use the latest in the 4.x and 6.x branches of PHPUnit when running tests on Travis.
Props netweb, ayeshrajans

Fixes #41472

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


git-svn-id: http://core.svn.wordpress.org/trunk@41134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 16:09:43 +00:00
John Blackbourn ed21c69ca9 Build/Test tools: Remove usage of `DOING_AJAX` from the test suite, so all tests that expect either an Ajax request or a
non-Ajax request can operate without being skipped.

Props Mte90

Fixes #41561

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


git-svn-id: http://core.svn.wordpress.org/trunk@41133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 15:08:43 +00:00
John Blackbourn 76e864854f Widgets: Correctly strip slashes from widget and sidebar names to allow namespaced widgets to function correctly.
Fixes #27770

Props jdgrimes

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


git-svn-id: http://core.svn.wordpress.org/trunk@41132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:52:44 +00:00
John Blackbourn 2cde37040d Login and Registration: Introduce a `login_link_separator` filter to allow the separator between links in the footer of the
login screen to be filtered.

Props henry.wright

Fixes #40802

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


git-svn-id: http://core.svn.wordpress.org/trunk@41131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:23:47 +00:00
John Blackbourn c7a79b0e6a Plugins: Introduce singular capabilities for activating and deactivating individual plugins.
This introduces the following meta capabilities:

* `activate_plugin`
* `deactivate_plugin`
* `deactivate_plugins`

The singular `activate_plugin` and `deactivate_plugin` capabilities are used along with the corresponding plugin name when
determining whether or not a user can activate or deactivate an individual plugin.

The plural `deactivate_plugins` capability is used in place of the existing `activate_plugins` capability when determining
whether a user can deactivate plugins.

Each of these new meta capabilities map to the existing `activate_plugins` primitive capability, which means there is no
change in existing behaviour, but plugins can now filter the capabilities required to activate and deactivate individual
plugins.

Fixes #38652 

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


git-svn-id: http://core.svn.wordpress.org/trunk@41130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 14:02:44 +00:00
John Blackbourn 28eda6f4bc General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620

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


git-svn-id: http://core.svn.wordpress.org/trunk@41129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:52:48 +00:00
John Blackbourn 9891448a42 Media: Rename several attachment related parameters from `$post_id` to `$attachment_id` for clarity, and improve related
documentation.

See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:12:44 +00:00
Boone Gorges c080c0a2ea Introduce `paged` argument to `WP_Comment_Query`.
Using `paged` with `number` allows developers to request
paginated comment results without having to do a manual offset
calculation.

Props AdamWills.
Fixes #38268.
Built from https://develop.svn.wordpress.org/trunk@41287


git-svn-id: http://core.svn.wordpress.org/trunk@41127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-21 15:35:46 +00:00
Drew Jaynes 1770cc7b87 Docs: Fix a typo in the DocBlock description for `add_shortcode()` introduced in [41281].
Props grapplerulrich.
See #37222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:38:42 +00:00
Drew Jaynes 0eecbf8baf Docs: Clarify that `get_comments_number()` can return either a numeric string (for compatibility reasons) or 0 if the post doesn't exist.
Also update the hook doc for the `get_comments_number` filter to reflect the mixed type for `$count`.

Props kiranpotphode for the initial patch.
Fixes #38369.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:13:47 +00:00
Drew Jaynes f94c77661d Docs: Improve the return description for `get_post_format_slugs()` to note that the array contains slugs as both keys and values.
Props danielbachhuber.
Fixes #38611.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 20:03:54 +00:00
Drew Jaynes 15373a020d Docs: Clarify that the second parameter passed to a shortcode callback is the shortcode content or null, rather than the content the shortcode was found in.
See #37222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:56:45 +00:00
Drew Jaynes b2b6f48127 Shortcodes: Rename the `$func` parameter for `add_shortcode()` to `$callback` to improve clarity.
See #37222. See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:48:45 +00:00
Drew Jaynes 33997cc66c Docs: Improve documentation for `add_shortcode()` by:
* Removing inline examples already listed in the Code Reference
* Improving the summary and description to explain how tag conflicts are handled
* Supplement the docs for the `$func` parameter by describing the three arguments passed to a shortcode callback.

Props grapplerulrich for the initial patch.
Fixes #37222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:44:42 +00:00
Drew Jaynes abf8e91521 Docs: Add a note to the `register_taxonomy()` DocBlock that the object types defined in `$object_type` when modifying an already-registered taxonomy will be overwritten.
Props danielbachhuber and BjornW for the initial patches.
Fixes #34413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 19:23:47 +00:00
John Blackbourn bc15cff6f4 Build/Test tools: Revert [41278] because the PHP 5.2 environment on Travis doesn't support OpenSSL, hence the tests fail.
See #41676

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


git-svn-id: http://core.svn.wordpress.org/trunk@41119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 12:59:43 +00:00
John Blackbourn 33570415d1 Build/Test tools: Don't skip tests which rely on OpenSSL when the `openssl` extension isn't loaded.
See #41676

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


git-svn-id: http://core.svn.wordpress.org/trunk@41118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 12:31:43 +00:00
Pascal Birchler eccf27c514 Build/Test Tools: Remove unneeded commas to fix JSHint error introduced
in [41271].

See #30666.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 09:13:44 +00:00
Drew Jaynes ffa7e7d4ab Docs: Improve the usefulness and accuracy of the file header for wp-cron.php.
Props stevenlinx for the initial patch.
Fixes #31401.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:37:45 +00:00
Drew Jaynes 78da113bd0 Docs: Add a missing return description for the deprecated `get_screen_icon()` function.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:04:44 +00:00
Drew Jaynes 510fb1fe85 Administration: Explicitly deprecate `screen_icon()` and `get_screen_icon()`, which were soft-deprecated in [26537] for 3.8.0.
Props ippei-sumida for the initial patch.
Fixes #41153.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 04:03:45 +00:00
Drew Jaynes a1ceeba8ac Docs: Explicitly deprecate the `add_tab()`, `remove_tab()`, and `print_tab_image()` methods for `WP_Customize_Image_Control`, originally soft-deprecated in 4.1.
Props jrf.
See #41121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-20 03:38:46 +00:00
Drew Jaynes d2b78649a2 Docs: Document user object parameters for a variety of functions in wp-includes/user.php as `WP_User` type instead of the more generic `object` type.
Props sebastianpisula.
Fixes #40945.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 20:19:44 +00:00
Aaron Jorbin 7f7d4ef451 Build/Test Tools: Add banner to minified CSS files
Patches occasionally come in on generated files. We should be kind to new contributors and give them a hint that these files are auto generated.

Props drewapicture, samuelsidler, netweb, valendesigns, kpdesign, nacin, jorbin
Fixes #30666

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


git-svn-id: http://core.svn.wordpress.org/trunk@41111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 20:10:47 +00:00
John Blackbourn 2916cd9417 Media: bring the capability check in `wp_ajax_crop_image()` inline with those in `wp_ajax_imgedit_preview()` and `wp_ajax_image_editor()`.
This change means that a user can crop an image if they have the ability to edit its attachment post, without requiring the ability to access the Customizer.

Fixes #40193

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


git-svn-id: http://core.svn.wordpress.org/trunk@41110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 13:30:43 +00:00
Felix Arntz 755a926b65 Multisite: Use correct capability for the Updates page in the network admin.
A user should not be required to have the `update_core` capability to access the Updates page. Having one of the update capabilities for core, plugins, themes and languages should be sufficient.

Fixes #41538.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-19 10:39:44 +00:00
Felix Arntz f6ebc1a80c Role/Capability: Introduce capabilities dedicated to installing and updating language files.
The new meta capabilities are called `install_languages` and `update_languages`. Prior to this change, there were no proper capability checks applied. Instead only the filesystem and related constants were checked, and for actual permissions a rather vague fallback was used where a user needed to have at least one of the other updating capabilities. In addition to being generally more verbose, the new capabilities make it possible for example to allow a user to update languages, but nothing else. By default they fall back to the original way of how they were handled.

Props johnbillion, flixos90.
Fixes #39677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 18:31:44 +00:00
Felix Arntz c14e0a0527 Post Thumbnails: Pass post ID to `post_thumbnail_size` filter.
In addition to the enhancement, tests for the filter usage including the new parameter have been added.

Props NathanAtmoz.
Fixes #39030.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 18:19:44 +00:00
Konstantin Obenland 7414759f92 Widgets: Add tests for `retrieve_widgets()`.
Helps with maintaining back compat when making changes in the future.

See #39693.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 15:04:43 +00:00
Adam Silverstein a806e2d3b3 Docs: Improve JavaScript documentation in autosave.js.
Add and improve JSDOC blocks.

Props carolinegeven.
Fixes #41203.



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


git-svn-id: http://core.svn.wordpress.org/trunk@41105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 14:24:45 +00:00
Adam Silverstein d856eda571 Docs: Improve JavaScript documentation in color-picker.js.
Add and improve JSDOC blocks.

Props carolinegeven, jjcomack, jipmoors.
Fixes #41063.



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


git-svn-id: http://core.svn.wordpress.org/trunk@41104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 13:10:44 +00:00
Gary Pendergast 61d683989f Tests: Rename ignored tests in `multisite.xml`.
For  bonus :yolo: :friday:, this repeats [41262] for `multisite.xml`, which duplicates the ignored file list from `phpunit.xml.dist`.

See #41658.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 11:00:45 +00:00
Gary Pendergast 190012c409 Tests: Rename ignored tests in `phpunit.xml.dist`.
Some of the files renamed in [41261] are listed in `phpunit.xml.dist`, as they need to be ignore in PHP 5.2.

This followup commit changes `phpunit.xml.dist` to match their new names.

See #41658.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 10:27:43 +00:00
Gary Pendergast 01be3075b6 Tests: Rename tests with underscore in the name
There were a handful of files with an underscore in the name, which violated our naming scheme, and caused problems for anyone how enforced the scheme on their own systems.

This commit renames all of the files to the correct camelCase scheme.

Fixes #41658.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 09:58:46 +00:00
Weston Ruter 667f377cd0 Widgets: Prevent visual Text widget from decoding encoded HTML.
Also apply `the_editor_content` filters on widget `text` with `format_for_editor()` as is done for the post editor.

Amends [40631].
Props westonruter, azaozz.
See #35243.
Fixes #41596.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-17 23:37:43 +00:00
Andrew Ozz b1d28c5e90 TinyMCE: Add the default `link` plugin without enabling it. This makes it easy for WordPress plugins to use it at places where `wplink` is not suitable, for example when initializing the editor from JS.
Props turtlepod.
Fixes #41590.
Built from https://develop.svn.wordpress.org/trunk@41259


git-svn-id: http://core.svn.wordpress.org/trunk@41099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-17 21:04:45 +00:00
Drew Jaynes d5e3ea444d Filesystem: Introduce the `pre_move_uploaded_file` filter.
Passing a non-null value to the filter will prevent the uploaded file from being moved to the uploads directory for any of the functions leveraging `_wp_handle_upload()`, such as `wp_handle_upload()` or `wp_handle_sideload()`.

Error reporting related to the file being moved will also be skipped.

Props ryan, Mte90.
Fixes #24603.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 21:59:43 +00:00
Drew Jaynes e80cf1d861 Canonical: Check first before attempting to include a 'path' value in the URL in `strip_fragment_from_url()`.
Props Mte90.
Fixes #40542.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 21:11:43 +00:00
Weston Ruter ea92bb5f10 Customize: Harden color control's logic for obtaining default value to prevent JS error when non-string default supplied.
Props andreagobetti, yonivh for testing.
Fixes #37174.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-16 19:04:47 +00:00
John Blackbourn e06146a9b5 Options, Meta APIs: Update the multisite unit tests after [41254], [41164], and [41163].
This moves some more previously Multisite-only tests into the main test suite, and makes small adjustments to their assertions.

See #39118, #16470, #39117

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


git-svn-id: http://core.svn.wordpress.org/trunk@41095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-15 09:16:43 +00:00
John Blackbourn b52e37f9bf Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin email address.
This adds this previously Multisite-only functionality to single site installations too. This change prevents accidental or erroneous email address changes from potentially locking users out of their site.

Props MatheusGimenez, johnbillion

Fixes #39118

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


git-svn-id: http://core.svn.wordpress.org/trunk@41094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 20:13:43 +00:00
John Blackbourn b51f60de6d Users: Display the "Your email address has not been updated yet" message when a user changes their profile email address from within network admin.
This ensures continuity with the regular profile editing screen and the user admin profile editing screen.

Fixes #41635

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


git-svn-id: http://core.svn.wordpress.org/trunk@41093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 19:42:43 +00:00
Weston Ruter 75ad3494a8 Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover.
Props timmydcrawford, westonruter.
See #39993.
Fixes #41274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 17:56:42 +00:00
Weston Ruter ae47e05f74 Widgets: Suppress PHP warnings raised by `DOMDocument::loadHTML()` in `WP_Widget_Text::is_legacy_instance()` which could appear in Text widget forms.
Also explicitly use HTML5 doctype when parsing Text widget contents in legacy mode detection.

Amends [41050].
See #40951.
Fixes #41622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 05:59:42 +00:00
Peter Wilson d8bf666313 Emoji: Update Twemoji to 2.5.0.
Twemoji 2.3.0 has a rendering issue in Safari, emoji can sometimes be followed by U+FEOF (which is just a flag meaning "render the preceding character as emoji).

Twemoji wasn't catching this character correctly, and Safari rendered it incorrectly.

Twemoji 2.5.0 resolves this issue.

Fixes #41584.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 02:04:45 +00:00
Weston Ruter 18613c0010 Widgets: Add missing `open` class for expanded widgets in Customizer; utilize `open` class for expansion detection in Text and Media widgets.
Fixes #41625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:25:43 +00:00
Weston Ruter 5c755f652b Customize: Prevent attachment deletions from silently failing in media modals opened for Media widgets.
Amends [40640].
See #32417.
Fixes #41609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:11:43 +00:00
Weston Ruter e956aa4176 Customize: Prevent wide widgets from being displayed as wide when Customizer is displayed in mobile breakpoint.
Fixes #41624.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:55:43 +00:00
Weston Ruter a5d3688157 Customize: Update selector to add `max-height`/`max-width` for wide widgets to account for JS-driven Text widget and Media widgets.
Fixes #41623.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:42:42 +00:00
Weston Ruter 9c3cdaf3fb Widgets: Fix extensibility of Text widgets so that JS logic will initialize on subclassed widgets.
Amends [40631].
See #35243.
Fixes #41540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:25:46 +00:00
Weston Ruter 300894da61 Customize: Prevent `_delete_option_fresh_site()` from hitting DB if `fresh_site` flag already cleared.
Amends [38991].
Props dlh, westonruter.
Fixes #41039.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 00:57:43 +00:00
Weston Ruter 6428de97a7 Customize: Fix PHP warning raised when deleting a setting from changeset via passing `null` as params in `WP_Customize_Manager::save_changeset_post()`.
Props dlh.
Fixes #41621.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 21:21:48 +00:00
Felix Arntz 473e1ba73b Multisite: Remove references to `$wpdb->siteid` and use `get_current_network_id()` instead.
Props sathyapulse, spacedmonkey.
Fixes #41507.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 13:11:43 +00:00
Felix Arntz 820d3973a3 Multisite: Rename internal `$site_id` variables referencing networks to `$network_id`.
This change improves code clarity by using the current naming conventions for networks.

Props lemacarl.
Fixes #41510.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 12:48:47 +00:00
Weston Ruter f0ee106d86 Media: Upgrade MediaElement.js from 4.2.3 to 4.2.5.
Props rafa8626.
See #39686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-12 06:20:44 +00:00
Adam Silverstein f42a3a2440 Docs: Improve JavaScript documentation in audiovideo.manifest.js.
Add and improve JSDOC blocks.

Props nicollle, manuelaugustin.
Fixes #41602.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-11 20:37:45 +00:00
James Nylen fce0b2dcd9 REST API: Always call `rest_get_server()` instead of accessing the `$wp_rest_server` global.
This is a consistency improvement and also a bug fix for fairly obscure cases involving modified WP load order.

Fixes #41555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-10 01:38:43 +00:00
Konstantin Obenland e183d59acb Map nav menu locations on theme switch
This will send nav menu locations through three levels of mapping:
1. If both themes have only one location, that gets mapped.
2. If both themes have locations with the same slug, they get mapped.
3. Locations that (even partially) match slugs from a similar kind of menu location will get mapped.

Menu locations are mapped for Live Previews in the Customizer and during theme switches.

Props westonruter, obenland, welcher, melchoyce.
Fixes #39692.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-09 21:04:47 +00:00
Sergey Biryukov 5fe8d31118 Link Template: Allow the `type` argument to be passed through `get_the_comments_pagination()` as long as its value isn't `array`.
See [30820] for `get_the_posts_pagination().

Props jainnidhi, poena.
Fixes #39792.
Built from https://develop.svn.wordpress.org/trunk@41236


git-svn-id: http://core.svn.wordpress.org/trunk@41076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-09 04:07:43 +00:00
Sergey Biryukov dd330359eb Docs: Correct `@param` type for `$term_id` in `get_term_children()`.
Props Soean, wido.
Fixes #41585.
Built from https://develop.svn.wordpress.org/trunk@41235


git-svn-id: http://core.svn.wordpress.org/trunk@41075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-08 20:53:46 +00:00
Sergey Biryukov 187b4ad48b Media: Pass shortcode attributes to `wp_audio_shortcode_class` and `wp_video_shortcode_class` filters.
Props sathyapulse.
Fixes #37329.
Built from https://develop.svn.wordpress.org/trunk@41234


git-svn-id: http://core.svn.wordpress.org/trunk@41074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-05 16:42:45 +00:00
Drew Jaynes 1a123e432f External Libraries: Update jQuery Form (unused in core) to the latest version, 4.2.1.
Fixes #41565.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-05 13:00:47 +00:00
John Blackbourn 41f71598f7 Formatting: Introduce `get_the_post_type_description()` to allow post type archive descriptions to be formatted the same as author and term archives.
Props henry.wright

Fixes #40040

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


git-svn-id: http://core.svn.wordpress.org/trunk@41072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 23:01:44 +00:00
John Blackbourn c96b33e3a5 Plugins: Correct and improve docblocks for the various `plugin_action_links` filters on the Plugins screen.
This also adds a changelog for the removal of the Edit links in [41160].

See #41017
Fixes #38169

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


git-svn-id: http://core.svn.wordpress.org/trunk@41071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 22:15:45 +00:00
John Blackbourn c26b735c8a Multisite: Clarify descriptions of the `wpmu_signup_blog_notification()` and `wpmu_signup_user_notification()` functions.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 14:21:43 +00:00
John Blackbourn 5062d7d134 Media: Move the `Tests_Media::test_video_shortcode_body()` method so it runs before other tests in the class that depend on it.
The following tests were never executed as they have `@depends` annotations which means they get skipped because the `test_video_shortcode_body()` test has not run by the time they run. Re-ordering the test methods fixes this.

* `test_wp_video_shortcode_with_empty_params()`
* `test_wp_video_shortcode_with_bad_attr()`
* `test_wp_video_shortcode_attributes()`
* `test_wp_video_shortcode_youtube_remove_feature()`
* `test_wp_video_shortcode_youtube_force_ssl()`
* `test_wp_video_shortcode_vimeo_force_ssl_remove_query_args()`
* `test_wp_video_shortcode_vimeo_adds_loop()`
* `test_wp_video_shortcode_vimeo_force_adds_loop_true()`

See #35367

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


git-svn-id: http://core.svn.wordpress.org/trunk@41069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 14:06:43 +00:00
John Blackbourn 22779110c4 REST API: Populate some missing tests from test cases which extend the controller test case.
See #41463

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


git-svn-id: http://core.svn.wordpress.org/trunk@41068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-04 13:56:46 +00:00
Andrea Fercia a029f83fb5 Menus: Visually hide the menu item edit link text in a consistent way.
Fixes a visual glitch visible on Ubuntu. WordPress uses system fonts and they have
different metrics across operating systems. Uses screen-reader-text as a more
solid way to visually hide text.

Props punit5658, afercia.
Fixes #41497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 22:12:43 +00:00
Felix Arntz 1d0478d4b1 REST API: Allow site administrators to edit user roles in multisite.
While site administrators cannot generally edit users in multisite, they have always been able to change the roles of users on their site. In the REST API however, this has not been possible so far. This changeset brings parity with how it is handled in the administration panel: A REST request to edit only a user's roles succeeds correctly, while a REST request to edit any further details of a user fails.

Props jnylen0.
Fixes #40263.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 21:59:44 +00:00
Felix Arntz 7e2ca92e69 Multisite: Introduce a `can_add_user_to_blog` filter to prevent adding a user to a site.
Under certain circumstances, it can be necessary that a user should not be added to a site, beyond the restrictions that WordPress core applies. With the new `can_add_user_to_blog` filter, plugin developers can run custom checks and return an error in case of a failure, that will prevent the user from being added.

The user-facing parts and the REST API route that interact with `add_user_to_blog()` have been adjusted accordingly to provide appropriate error feedback when a user could not be added to a site. Furthermore, two existing error feedback messages in the site admin's "New User" screen have been adjusted to properly show inside an error notice instead of a success notice.

Props jmdodd.
Fixes #41101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 21:41:45 +00:00
Andrea Fercia 19aab9d3d6 REST API: Make jshint happy again after [41222].
See #40919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 20:36:42 +00:00
James Nylen 0ef4d4289f REST API: Exclude numeric parameters from regex parsing
The list of endpoint parameters should only include explicitly named and requested parameters.

Props flixos90, rmccue, jnylen0.
Fixes #40704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 19:55:43 +00:00
James Nylen 17c48865db REST API: Add QUnit tests for `api-request.js`
These should have been included in [41206].

See #40919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 19:47:45 +00:00
John Blackbourn 4981452aba General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs.
See #38462, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 16:13:44 +00:00
John Blackbourn 38f91be819 General: Fix a typo introduced in [41219].
See #38462

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


git-svn-id: http://core.svn.wordpress.org/trunk@41060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:46:44 +00:00
John Blackbourn b140e8f574 General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.
Props keesiemeijer for identifying the issues

See #38462

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


git-svn-id: http://core.svn.wordpress.org/trunk@41059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:43:43 +00:00
Drew Jaynes 8e71c49a12 Docs: Add missing documentation for the `$data` parameter for `WP_Http::browser_redirect_compatibility()`.
Props ronakganatra for the initial patch.
Fixes #41380.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 15:24:44 +00:00
John Blackbourn 375f495231 General: Add missing parameters to instances of the `the_permalink` filter.
This ensures every instance of this filter receives the same parameters.

Props keesiemeijer for identifying the issue

See #38462

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


git-svn-id: http://core.svn.wordpress.org/trunk@41057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:59:44 +00:00
John Blackbourn 4cdbe950e9 Docs: Add a missing docblock for the `the_content_rss` filter.
See #38462, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:46:43 +00:00
John Blackbourn d510413811 Docs: Fix various filter documentation.
See #38462, #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 14:34:44 +00:00
John Blackbourn 763ac66754 Networks and Sites: Display an indicator for the active theme or child theme when viewing a site's themes within Network Admin.
Props palmiak, euthelup

Fixes #41168

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


git-svn-id: http://core.svn.wordpress.org/trunk@41054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 13:49:43 +00:00
John Blackbourn dee0e3a67b Users: Switch to using array style filters for the newly introduced filters in `wp_password_change_notification()` and `wp_new_user_notification()`.
This introduces three new filters, replacing those that were introduced in [41153]:

* `wp_password_change_notification_email`
* `wp_new_user_notification_email_admin`
* `wp_new_user_notification_email`

Props pbearne

Fixes #38068

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


git-svn-id: http://core.svn.wordpress.org/trunk@41053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 13:21:46 +00:00
John Blackbourn c184d766e9 Docs: Correct and improve the documentation for the `send_confirmation_on_profile_email()` function and the `new_user_email_content` filter.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:43:44 +00:00
John Blackbourn e0c397bdfa Docs: Correct and improve the documentation for the `update_option_new_admin_email()` function and the `new_admin_email_content` filter.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@41048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:04:43 +00:00
James Nylen e77ac0c6eb Remove unnecessary semicolon
See #40919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 17:16:44 +00:00
James Nylen c91b130b53 REST API: Allow overriding `jQuery.ajax` calls from within wp-admin
There are now 3 places where we call out to the REST API from within wp-admin.  This commit introduces a small library to allow overriding these calls, centralize nonce-passing logic, and eliminate the need to pass a full REST URL down to client code (this last feature is not yet used and will be explored in a separate ticket).

Fixes #40919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 16:45:44 +00:00
Weston Ruter a193916f46 Customize: Introduce `settings_previewed` arg and getter on `WP_Customize_Manager` which controls whether `WP_Customize_Setting::preview()` should be called on settings.
The `settings_previewed` property eliminates the need for the Customizer components from having to look at global `doing_ajax` state. This is in particular needed when saving settings, as some settings will short-circuit the update operation if they detect no changes are introduced. This is also needed for low-level integrations with the Customizer, such as in REST API endpoints under development.

Props stubgo, westonruter, utkarshpatel for testing.
See #38900.
Fixes #39221.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 05:35:41 +00:00
Weston Ruter eb658592df Customize: For selective refresh of nav menus, prevent `preg_replace()` from dropping backslashes in JSON replaced into the `data-customize-partial-placement-context` HTML attribute.
Props dlh, westonruter.
Fixes #41488.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 05:11:44 +00:00
Drew Jaynes 0401cee8b3 Docs: Reduce confusion in `@since MU` notationss by indicating the WP version (3.0.0) the code was merged into core while retaining the original context.
Props sathyapulse.
Fixes #41509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 20:44:43 +00:00
John Blackbourn ed60c36fb8 Formatting: Add the `$number` and `$decimals` arguments to the `number_format_i18n` filter.
Props alpipego

Fixes #41505

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


git-svn-id: http://core.svn.wordpress.org/trunk@41039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 14:38:48 +00:00
Weston Ruter 7af3b92736 Media: Upgrade MediaElement.js from 2.22.0 to 4.2.3.
Props rafa8626, grosbouff, westonruter, azaozz, Plastikschnitzer for testing.
See #39686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 04:43:51 +00:00
Andrea Fercia 59279ab349 Menus: Improve the responsive view for the Menu Name field and Save button.
Props punit5658.
Fixes #41499.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-31 21:22:44 +00:00
Scott Taylor 6bcf4d6f63 Media: update the `getID3` library to version `1.9.14` to avoid fatal errors in PHP7.
Props MyThemeShop for the initial patch.
Fixes #41496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-31 19:50:45 +00:00
Drew Jaynes 82d0a53e77 Docs: Use a third-person singular verb in the DocBlock summary for `WP_Importer::stop_the_insanity()`.
Also add a missing `@since` tag. Introduced in 3.0.0, see [14760].

See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:46:43 +00:00
Drew Jaynes 4835f7e817 Docs: Add a missing description for the `$wpdb` global notation in the DocBlock for `WP_Importer::stop_the_insanity()`.
Props tejas5989.
Fixes #41447.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:43:42 +00:00
Drew Jaynes 8fd5ec4e62 Docs: Use a third-person singular verb in the summary for `_wp_customize_publish_changeset()`.
Also adding missing `@since` and `@access` tags. Introduced in 4.7, see [38810].

See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:34:42 +00:00
Drew Jaynes 6ce9846893 Docs: Document use of the `$wpdb` and `$wp_customize` globals in `_wp_customize_publish_changeset()`.
Props sagarladani for the initial patch.
Fixes #41479.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:31:42 +00:00
Boone Gorges 42ac7e7e13 Taxonomy: Introduce `pre_term_link` filter.
This filter allows developers to filter the taxonomy permalink
structure before a term's permalink is generated. It parallels
the 'pre_post_link' filter for the 'post' post type.

Props nikeo.
Fixes #39601.
Built from https://develop.svn.wordpress.org/trunk@41191


git-svn-id: http://core.svn.wordpress.org/trunk@41031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 15:10:44 +00:00
Boone Gorges c657a2c060 Comments: Ignore the 'fields' parameter in the comment query cache.
`WP_Comment_Query` always queries runs an ID query, and so is unaffected
by the 'fields' parameter. As such, 'fields' can be ignored when building
a cache key for the results of the ID query.

Props spacedmonkey.
Fixes #41348.
Built from https://develop.svn.wordpress.org/trunk@41190


git-svn-id: http://core.svn.wordpress.org/trunk@41030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:56:41 +00:00
Sergey Biryukov e412ea2e6b Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS.
Update the Nginx "Missing (disappearing) HTTP Headers" link.

Props johnpgreen.
Fixes #41331.
Built from https://develop.svn.wordpress.org/trunk@41189


git-svn-id: http://core.svn.wordpress.org/trunk@41029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:52:44 +00:00
Boone Gorges f1fb17fbb5 Ensure that an assertion takes place in `Tests_Comment_Query::test_comment_query_should_be_cached()`.
Missed during [37608]. See #36906.

Fixes #41357.
Built from https://develop.svn.wordpress.org/trunk@41188


git-svn-id: http://core.svn.wordpress.org/trunk@41028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:43:42 +00:00
Sergey Biryukov 3d26fab9f6 Post Formats: In `bulk_edit_posts()`, set post format before the post is updated, for consistency with `edit_post()`.
This makes sure that plugins hooked to `save_post` get the right post format.

Props Chouby, SergeyBiryukov.
Fixes #41396.
Built from https://develop.svn.wordpress.org/trunk@41187


git-svn-id: http://core.svn.wordpress.org/trunk@41027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:41:42 +00:00
Drew Jaynes 7f5e00ba29 Docs: Remove an unrelated description about post meta from the DocBlock for add_user_meta().
Clean up syntax.

See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-30 14:32:45 +00:00
Sergey Biryukov a6e0b16749 Tests: Fully reset MockPHPMailer between tests.
Props pessoft.
Fixes #41485.
Built from https://develop.svn.wordpress.org/trunk@41185


git-svn-id: http://core.svn.wordpress.org/trunk@41025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-29 20:53:42 +00:00
Sergey Biryukov 6a74b306da Plugins: In `wp_star_rating()`, use explicit type casting for `$rating` to avoid a "non-numeric value encountered" warning in PHP 7.1.
Clarify in the function DocBlock that `$rating` can be a float.

Props afragen.
Fixes #41484.
Built from https://develop.svn.wordpress.org/trunk@41184


git-svn-id: http://core.svn.wordpress.org/trunk@41024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-29 20:35:45 +00:00
Pascal Birchler 66a3b24b72 Permalinks: Remove unnecessary semicolon after [41182].
See #29872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:55:46 +00:00
Pascal Birchler fd07b2254d Permalinks: Add buttons for the available structure tags to the admin UI.
Often times, it can be confusing to set a custom permalink structure. One has to double-check the documentation, make 
sure to correctly insert the structure tag, and hope not to break their site.

With this addition, the available structure tags are being displayed as a list of easily clickable buttons that can be 
used to insert tags to the custom structure input field and to remove them again.

Props kpdesign, swissspidy, joedolson, afercia.
Fixes #29872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:43:45 +00:00
Sergey Biryukov 2b1644b974 Docs: Add a `@staticvar` entry for `$first_dropdown` in `WP_Widget_Categories::widget()`.
Props ajayghaghretiya1.
Fixes #41473.
Built from https://develop.svn.wordpress.org/trunk@41181


git-svn-id: http://core.svn.wordpress.org/trunk@41021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 14:25:42 +00:00
Sergey Biryukov acb9773212 Users: After [41027], assign `$author_posts_url` outside of the condition to simplify the logic.
See #38085.
Built from https://develop.svn.wordpress.org/trunk@41180


git-svn-id: http://core.svn.wordpress.org/trunk@41020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 14:21:45 +00:00
Weston Ruter 18fd50d2b6 Media: Improve acceptance of YouTube /embed/ URLs when inserting in media modal.
Props timmydcrawford.
Fixes #41201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 02:36:46 +00:00
John Blackbourn df808fc42d General: Move the `__autoload()` compat function into its own file to prevent deprecated notices being thrown by the compiler in PHP 7.2.
The `__autoload()` function is deprecated in PHP 7.2, which means WordPress' own `__autoload()` compat function for PHP 5.2 needs to be moved into a separate file to prevent the PHP 7.2 compiler from complaining.

Props ayeshrajans

See #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 01:15:52 +00:00
John Blackbourn 4f2ef5438f Build/Test Tools: More PHP 7.2 tweaks for Travis CI.
See #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 21:32:40 +00:00
John Blackbourn 9ae6e6fb54 REST API: Add some missing assertions to various REST API tests.
See #41463

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


git-svn-id: http://core.svn.wordpress.org/trunk@41016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 19:04:44 +00:00
Aaron Jorbin 89fa297113 Build/Test Tools: Add PHP 7.2 to test matrix
PHP has branched 7.2 and master is now 7.3. This change ensures that 7.2 is tested. As 7.2 is still in development and is not ready for production, failures are allowed.

See #40109.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 17:38:42 +00:00
John Blackbourn 219de8acd5 General: Avoid counting uncountable values when reading theme directories, and in some unit tests.
See #40109

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


git-svn-id: http://core.svn.wordpress.org/trunk@41014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 17:00:44 +00:00
John Blackbourn 96183d09bd Formatting: Update the author description tests since the formatting change made in [41172].
See #40040

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


git-svn-id: http://core.svn.wordpress.org/trunk@41013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 16:06:55 +00:00
John Blackbourn 01e64d9ed0 Formatting: Add formatting and texturization to author descriptions so they match the formatting of term descriptions.
Props henry.wright

Fixes #40040

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


git-svn-id: http://core.svn.wordpress.org/trunk@41012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 15:10:42 +00:00
John Blackbourn fb515a8a63 Users: Further fixes to entitiy decoding in the user email address change confirmation email, and the corresponding tests.
See #16470, #40015

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


git-svn-id: http://core.svn.wordpress.org/trunk@41011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:59:43 +00:00
John Blackbourn efa54e6cdb Users: Update some tests for admin email change confirmation emails after [41164].
See #40015, #39117

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


git-svn-id: http://core.svn.wordpress.org/trunk@41010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:34:42 +00:00
John Blackbourn 2e767d2e1a Build/Test Tools: Clarify the error message when running the test suite without the WordPress Importer plugin present in the test suite.
See #41345

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


git-svn-id: http://core.svn.wordpress.org/trunk@41009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 14:01:42 +00:00
Drew Jaynes 8c7f5367c0 Docs: Remove some more top-level `@aacess` tags from function DocBlocks.
See #414532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 08:19:43 +00:00
John Blackbourn 6a16d726ef Options, Meta APIs: Fix a typo introduced in [41164].
See #39117

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


git-svn-id: http://core.svn.wordpress.org/trunk@41007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 03:12:44 +00:00
John Blackbourn ff20054573 Users: Add the new email address to the email address change notification email.
Fixes #39112

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


git-svn-id: http://core.svn.wordpress.org/trunk@41006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:57:43 +00:00
John Blackbourn 30d5450508 Users: Re-add entity decoding to the site name before it's used in the email address change confirmation email.
This was accidentally removed in [41163].

See #40015, #16470

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


git-svn-id: http://core.svn.wordpress.org/trunk@41005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:55:43 +00:00
John Blackbourn b9b4776800 Options, Meta APIs: Send a notification to the old admin email address when the site admin email or network admin email address is changed.
This reduces the chances of a site compromise going unnoticed, in the same way that the same notifications for user account email address changes reduces the chances of a user account compromise going unnoticed.

Props MatheusGimenez, johnbillion

Fixes #39117

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


git-svn-id: http://core.svn.wordpress.org/trunk@41004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:24:42 +00:00
John Blackbourn 62fe4be994 Users: Require a confirmation link in an email to be clicked when a user attempts to change their email address.
This adds this previously Multisite-only functionality to single site installations too. This change prevents accidental or erroneous email address changes from potentially locking users out of their account.

Props rodrigosprimo, tharsheblows, johnbillion

Fixes #16470

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


git-svn-id: http://core.svn.wordpress.org/trunk@41003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 02:10:42 +00:00
Drew Jaynes 0860bb2771 Docs: Remove `@access` notations from method DocBlocks in wp-includes/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:41:44 +00:00
Drew Jaynes 1a28ec87e1 Docs: Remove `@access` notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
John Blackbourn 32128ffd45 Administration: Remove `Edit` links from all plugin listing screens and the remaining theme listing screens.
This simplifies these list tables, reducing user confusion, without removing functionality.

Fixes #38169

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


git-svn-id: http://core.svn.wordpress.org/trunk@41000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 23:28:46 +00:00
John Blackbourn be94fa5483 Toolbar: Add `View User` and `Edit User` links to the admin toolbar to ease navigation between a user's archives and the user editing screen.
Props georgestephanis, lessbloat, johnbillion

Fixes #20307

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


git-svn-id: http://core.svn.wordpress.org/trunk@40999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 16:45:44 +00:00
John Blackbourn 6b22dbe59a Login and Registration: Introduce a `username_exists` filter, which allows for control over registration of usernames.
Props shamim51

Fixes #39320

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


git-svn-id: http://core.svn.wordpress.org/trunk@40998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 16:25:40 +00:00
Sergey Biryukov c7feb8387a Upgrade/Install: In `WP_Ajax_Upgrader_Skin`, call `::get_error_codes()` method on a `WP_Error` object `$this->errors` instead of a string variable `$errors`.
Props yrpwayne.
Fixes #41449.
Built from https://develop.svn.wordpress.org/trunk@41157


git-svn-id: http://core.svn.wordpress.org/trunk@40997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 13:39:44 +00:00
Sergey Biryukov 7d2b400876 Users: Use `esc_url()` instead of `esc_attr()` to escape the value of the `srcset` attribute in `get_avatar()`.
Props joemcgill, henry.wright.
Fixes #41215.
Built from https://develop.svn.wordpress.org/trunk@41156


git-svn-id: http://core.svn.wordpress.org/trunk@40996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 13:22:44 +00:00
Gary Pendergast a89f1e469b REST API: Update the fixture data for `wp-api.js` tests.
[41139] changed how the REST API URL is generated, but included an incorrect version of `wp-api-generated.js`.

This updates the generator to create the correct `wp-api-generated.js`, and updates ``wp-api-generated.js`.

See #40886.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 03:53:42 +00:00
John Blackbourn b6ca2d77a8 Users: Introduce filters for the contents of email notifications for new user registrations and password resets.
Introduces:

* `wp_password_change_notification_subject`
* `wp_password_change_notification_message`
* `wp_password_change_notification_headers`
* `wp_new_user_notification_admin_subject`
* `wp_new_user_notification_admin_message`
* `wp_new_user_notification_admin_headers`
* `wp_new_user_notification_subject`
* `wp_new_user_notification_message`
* `wp_new_user_notification_headers`

Props pbearne, dipesh.kakadiya

Fixes #38068

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


git-svn-id: http://core.svn.wordpress.org/trunk@40993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 00:54:43 +00:00
Sergey Biryukov 760d2b3771 I18N: Use a consistent context for Visual and Text editor tab labels.
Props pedromendonca.
Fixes #41438.
Built from https://develop.svn.wordpress.org/trunk@41152


git-svn-id: http://core.svn.wordpress.org/trunk@40992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 22:58:41 +00:00
Sergey Biryukov 4e4df0e6c9 Docs: Use 3-digit, x.x.x style semantic versioning for `@since 4.8.0` entries.
See #41017.
Built from https://develop.svn.wordpress.org/trunk@41151


git-svn-id: http://core.svn.wordpress.org/trunk@40991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 22:48:42 +00:00
John Blackbourn 2dfea4210b Users: Show a `Super Admin` label next to Super Admins on all user listing screens when the current user can manage network users.
Fixes #41165

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


git-svn-id: http://core.svn.wordpress.org/trunk@40990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 17:43:42 +00:00
Andrea Fercia de31d6f81c Widgets: make the Recent Posts widget output '(no title)' for posts without a title.
Since WordPress 2.3, the Recent Posts widget used to output the post ID for posts
with an empty title. Using '(no title)' seems a best option and is consistent with
what's already used in other similar cases.

Props antonrinas, Ankit K Gupta.
Fixes #35709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 16:13:45 +00:00
Andrea Fercia ac82a26fc5 Administration: WP_Screen: strip all tags from the columns display name.
This ensures all the column titles, not just the Comments column one, are
"clean" when later reused for the Screen Options checkboxes. Also introduces
some consistency with what is already done in WP_List_Table.

Fixes #41261.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 16:05:44 +00:00
Sergey Biryukov c957321007 Docs: Correct `@global` entry for `$cat_id` in `WP_Links_List_Table::column_categories()`.
Props tejas5989.
Fixes #41436.
Built from https://develop.svn.wordpress.org/trunk@41147


git-svn-id: http://core.svn.wordpress.org/trunk@40987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 13:19:42 +00:00
Sergey Biryukov 37a04795b2 Docs: Add a `@global` entry for `$wpdb` in `_get_cron_lock`.
Props tejas5989.
Fixes #41433.
Built from https://develop.svn.wordpress.org/trunk@41146


git-svn-id: http://core.svn.wordpress.org/trunk@40986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 12:56:43 +00:00
Sergey Biryukov 0a24e8d1cd Docs: Add `@access` entry for `WP_Comment_Query::fill_descendants()`.
Props umangvaghela123.
Fixes #41435.
Built from https://develop.svn.wordpress.org/trunk@41145


git-svn-id: http://core.svn.wordpress.org/trunk@40985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 12:54:45 +00:00
Weston Ruter 4042c0b416 TinyMCE: Fix styling of selected state for linked images containing captions.
Props azaozz.
Fixes #41408.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 02:19:42 +00:00
Gary Pendergast 7819daefd2 REST API: Always add `index.php` to the REST URL when pretty permalinks are disabled.
When pretty permalinks are disabled, the web server will internally forward requests to `index.php`. Unfortunately, nginx only forwards HTTP/1.0 methods: `PUT`, `PATCH`, and `DELETE` methods will return a 405 error.

To work around this nginx behaviour, including `index.php` in the REST URL skips the internal redirect.

Fixes #40886.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:50:43 +00:00
John Blackbourn b4c2f16d01 Users: Ensure that users with no role on a site are taken into consideration when listing users on Multisite.
This ensures that users who are a member of a site but have no role are correctly listed on the Users screen and can be filtered from the 'None' role filter.

Props tobi823, flixos90, scottlee

Fixes #36196

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


git-svn-id: http://core.svn.wordpress.org/trunk@40978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:24:43 +00:00
Weston Ruter 8648fc0bff Customize: Update Text widget starter content to utilize visual mode.
Amends [38991].
Props dlh, westonruter.
See #35243, #38114.
Fixes #41410.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:25:44 +00:00
Weston Ruter 4886abf23e Widgets: Improve notice in Text widget's legacy mode.
Also fixes phpunit test which broke in [41132].

Props melchoyce, westonruter, gk.loveweb.
See #41394, #35243, #40951, #40907.
Fixes #41386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:11:43 +00:00
Weston Ruter ddca4ceff1 Widgets: Rename Text widget's `legacy` mode to non-`visual` mode, restore boolean `filter` prop, and improve compatibility for `widget_text` filters applied in Custom HTML widget.
Props westonruter, obenland, timmydcrawford for testing.
Amends [41050].
See #35243, #40951, #40907.
Fixes #41394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:46:42 +00:00
John Blackbourn d8151e9dd1 Networks and Sites: Introduce an AYS when bulk deleting sites from the Sites screen in Network Admin.
Props flixos90, MaximeCulea

Fixes #41177

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


git-svn-id: http://core.svn.wordpress.org/trunk@40971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:41:42 +00:00
John Blackbourn 06e6edbd61 Comments: Ensure the correct comment ID is passed to the `get_comment_author_url` filter.
Props dominik.schwind

Fixes #41334

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


git-svn-id: http://core.svn.wordpress.org/trunk@40967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:03:45 +00:00
Sergey Biryukov 8c55e79bef Docs: Correct `@access` entry for `::load()` in `WP_Image_Editor`, `WP_Image_Editor_GD`, and `WP_Image_Editor_Imagick`.
Props upadalavipul.
Fixes #41423.
Built from https://develop.svn.wordpress.org/trunk@41125


git-svn-id: http://core.svn.wordpress.org/trunk@40965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 14:11:44 +00:00
Sergey Biryukov bed4804424 Tests: Fix typo in `Tests_Functions_AllowedProtocols::data_example_urls()`.
Props redrambles.
Fixes #41415.
Built from https://develop.svn.wordpress.org/trunk@41124


git-svn-id: http://core.svn.wordpress.org/trunk@40964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 10:03:44 +00:00
Sergey Biryukov 00b91b3003 Docs: Add a `@global` entry for `$wpdb` in `WP_Comment_Query::fill_descendants()`.
Props jontyravi.
Fixes #41412.
Built from https://develop.svn.wordpress.org/trunk@41123


git-svn-id: http://core.svn.wordpress.org/trunk@40963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 10:40:45 +00:00
John Blackbourn 2d464d4286 Users: Don't show the 'Add Existing User' form on the 'Add New User' screen to users without the `promote_users` capability.
Props bseddon, Mista-Flo

Fixes #37836

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


git-svn-id: http://core.svn.wordpress.org/trunk@40962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 01:14:43 +00:00
John Blackbourn 1d71fa865c Login and Registration: Correctly encode the redirect location URL when it's passed as a query parameter to the lost password URL.
Props adhun

Fixes #40728

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


git-svn-id: http://core.svn.wordpress.org/trunk@40961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 01:06:42 +00:00
John Blackbourn 2efb81d453 Administration: Send an appropriate HTTP response status code when an invalid action is passed to `admin-ajax.php`.
Props ryanrolds, ayeshrajans

Fixes #41269

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


git-svn-id: http://core.svn.wordpress.org/trunk@40960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 00:21:42 +00:00
John Blackbourn a4a0f65a8a Docs: Correct some inline docs for the Ajax test case.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@40959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-23 00:02:46 +00:00
Weston Ruter f3ec3c36a0 Widgets: Fix typo in phpunit test for Custom HTML widget in [41116].
Fixed was applied in 4.8 branch via [41117].
See #41392.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:22:42 +00:00
Weston Ruter f283e9d81f Widgets: Include `widget_text` class name on Custom HTML widget wrapper for theme styling compatibility, in addition to previously-added `textwidget` class on nested content container.
Amends [40893], [41115].
See #40907.
Fixes #41392 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:02:43 +00:00
Weston Ruter 048ac7df67 Widgets: Improve theme styling compatibility for Custom HTML widget by adding container with `textwidget` class.
The same styling from the Text widget should apply to the Custom HTML widget since users are expected to copy HTML from the (legacy) Text widget into the latter.

Amends [40893].
See #40907.
Fixes #41392.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 18:13:45 +00:00
Sergey Biryukov e8e68a50f8 Docs: Correct `$term_id` parameter description in `wp_xmlrpc_server::get_term_custom_fields()` and `::set_term_custom_fields()`.
Props upadalavipul.
Fixes #41397.
Built from https://develop.svn.wordpress.org/trunk@41114


git-svn-id: http://core.svn.wordpress.org/trunk@40954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 13:40:43 +00:00
Sergey Biryukov 118dba300e Docs: Add `@staticvar` entries for `$cache` and `$tested_paths` in `wp_upload_dir()`.
Props ajayghaghretiya1.
Fixes #41395.
Built from https://develop.svn.wordpress.org/trunk@41113


git-svn-id: http://core.svn.wordpress.org/trunk@40953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 10:15:44 +00:00
K. Adam White 6aaba32b36 WP-API JS Client: Interpret Settings resource as a model.
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.

When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.

Props @adamsilverstein.
Fixes #41056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 20:26:45 +00:00
Sergey Biryukov 970afde4c0 Docs: Add a `@global` entry for `$wpdb` in `get_author_user_ids()`, `get_editable_authors()`, `get_editable_user_ids()`, `get_nonauthor_user_ids()`, and `get_others_unpublished_posts()`.
Props parthsanghvi.
Fixes #41368.
Built from https://develop.svn.wordpress.org/trunk@41111


git-svn-id: http://core.svn.wordpress.org/trunk@40951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 14:02:44 +00:00
Sergey Biryukov 4653f8bcfa Docs: Add a `@global` entry for `$wp_filesystem` in `wp_ajax_install_theme()`, `wp_ajax_update_theme()`, `wp_ajax_delete_theme()`, `wp_ajax_install_plugin()`, `wp_ajax_update_plugin()`, and `wp_ajax_delete_plugin()`.
Props ronakganatra.
Fixes #41382.
Built from https://develop.svn.wordpress.org/trunk@41110


git-svn-id: http://core.svn.wordpress.org/trunk@40950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:47:43 +00:00
Sergey Biryukov 3946198df8 Docs: Add `@staticvar` entries for `get_html_split_regex()` and `_get_wptexturize_split_regex()`.
Props ajayghaghretiya1.
Fixes #41385.
Built from https://develop.svn.wordpress.org/trunk@41109


git-svn-id: http://core.svn.wordpress.org/trunk@40949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:38:44 +00:00
Sergey Biryukov 24f6903c4d Docs: Add `@access` entries for `WP_Upgrader_Skin::set_upgrader()`, `::request_filesystem_credentials()`, and `::decrement_update_count()`.
See #41383.
Built from https://develop.svn.wordpress.org/trunk@41108


git-svn-id: http://core.svn.wordpress.org/trunk@40948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:35:43 +00:00
Sergey Biryukov 8728f8ae1e Docs: Add `@access` entry for `Automatic_Upgrader_Skin::request_filesystem_credentials()`.
Props rushabh4486.
Fixes #41383.
Built from https://develop.svn.wordpress.org/trunk@41107


git-svn-id: http://core.svn.wordpress.org/trunk@40947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:33:43 +00:00
Sergey Biryukov f8155cedb2 Docs: Add `@access` entries for `Bulk_Upgrader_Skin::before()` and `::after()`.
Props rushabh4486.
Fixes #41384.
Built from https://develop.svn.wordpress.org/trunk@41106


git-svn-id: http://core.svn.wordpress.org/trunk@40946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:25:42 +00:00
Sergey Biryukov 54b8dafd62 Docs: Change `@version` entry for `WP_Http::buildCookieHeader()` to `@since`.
See #41381.
Built from https://develop.svn.wordpress.org/trunk@41105


git-svn-id: http://core.svn.wordpress.org/trunk@40945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:15:43 +00:00
Sergey Biryukov 2026da9512 Docs: Add `@access` entries for `WP_Http::block_request()`, `::handle_redirects()`, and `::is_ip_address()`.
Props ronakganatra.
Fixes #41381.
Built from https://develop.svn.wordpress.org/trunk@41104


git-svn-id: http://core.svn.wordpress.org/trunk@40944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 13:14:44 +00:00
Sergey Biryukov 47bf429c0b Docs: Add `@access` entries for `before()` and `after()` methods in `Bulk_Plugin_Upgrader_Skin` and `Bulk_Theme_Upgrader_Skin`.
See #41365.
Built from https://develop.svn.wordpress.org/trunk@41103


git-svn-id: http://core.svn.wordpress.org/trunk@40943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:09:43 +00:00
Sergey Biryukov 90372258a0 Docs: Add `@access` entries for `__construct()` in `WP_Upgrader_Skin`, `Bulk_Upgrader_Skin`, `Language_Pack_Upgrader_Skin`, `Plugin_Upgrader_Skin`, and `Theme_Upgrader_Skin`.
Props rushabh4486.
Fixes #41376.
Built from https://develop.svn.wordpress.org/trunk@41102


git-svn-id: http://core.svn.wordpress.org/trunk@40942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:06:43 +00:00
Sergey Biryukov 27c38e9b6f Docs: Add `@access` entries for `feedback()` and `error()` methods in `WP_Upgrader_Skin`, `Bulk_Upgrader_Skin`, and `Language_Pack_Upgrader_Skin`.
See #41365.
Built from https://develop.svn.wordpress.org/trunk@41101


git-svn-id: http://core.svn.wordpress.org/trunk@40941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 12:00:43 +00:00
Sergey Biryukov 5734818e35 Docs: Add `@access` entries for `$admin_header_callback` and `$admin_image_div_callback` properties in `Custom_Image_Header` and `Custom_Background`.
Props rushabh4486.
Fixes #41377.
Built from https://develop.svn.wordpress.org/trunk@41100


git-svn-id: http://core.svn.wordpress.org/trunk@40940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 11:54:43 +00:00
Sergey Biryukov feeab7ef05 Docs: Correct `@access` entry for `Custom_Image_Header::default_headers`.
Props rushabh4486.
Fixes #41378.
Built from https://develop.svn.wordpress.org/trunk@41099


git-svn-id: http://core.svn.wordpress.org/trunk@40939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 11:48:45 +00:00
James Nylen f48ed236ff About page: Add a privacy policy.
Props MattyRob, johnbillion, swissspidy.
Fixes #40794.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 21:42:42 +00:00
Weston Ruter 8b3d2e0876 Widgets: Improve Text widget's reliability in syncing Visual tab's contents with Text tab and with hidden sync inputs.
Amends [40631].
Props azaozz, westonruter, rinkuyadav999 for testing.
See #35243.
Fixes #40974 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:49:45 +00:00
Andrew Ozz a798266ba3 TinyMCE: remove unused code from the `wpeditimage` plugin.
Fixes #41369.
Built from https://develop.svn.wordpress.org/trunk@41092


git-svn-id: http://core.svn.wordpress.org/trunk@40932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 13:41:46 +00:00
Sergey Biryukov 9ed31682db Docs: Add `@access` entry for `Automatic_Upgrader_Skin::feedback()`.
Props akbarhusen.
Fixes #41365.
Built from https://develop.svn.wordpress.org/trunk@41091


git-svn-id: http://core.svn.wordpress.org/trunk@40931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 11:14:45 +00:00
James Nylen 793dd51f88 Tests: Be more helpful when the `wordpress-importer` plugin is missing.
Link to some documentation that explains the problem and how to resolve it.

Props enrico.sorcinelli.
Fixes #41345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 10:38:47 +00:00
Weston Ruter 9330e39b3d Widgets: Check for existence of `wp.customize.state` before attempting to access in Text widget.
Amends [40631].
See #35243.
Fixes #41361 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:36:42 +00:00
Weston Ruter 1a005d853f Widgets: Replace adding `balanceTags` on `widget_custom_html_content` filter in favor of just applying `widget_text` filters in the Custom HTML widget.
Ensures that users who copy HTML from the Text widget in legacy mode over to the Custom HTML widget will continue to get all of the same filters applied, including tag balancing and shortcodes, if a plugin added support. Plugins still have the `widget_text_content` and `widget_custom_html_content` filters they can use to target the specific widget types.

Amends [40893].
See #40951.
Fixes #40907 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:11:44 +00:00
James Nylen bcdbe8a0bf Build: Switch PHP 5.2 and 5.3 to Travis' Ubuntu `precise` image
Starting today, Travis will begin switching the default image to `trusty`, which does not support PHP 5.2 or 5.3.

This is not a full fix, because Travis will be dropping `precise` support entirely in September (https://github.com/travis-ci/travis-ci/issues/8072).  However, it buys us some time until then.

Props netweb.
Fixes #41292 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 08:25:46 +00:00
Weston Ruter 770fb1b35c Widgets: Discount shortcodes and leading/trailing line breaks for triggering Text widget legacy mode.
Since plugin-added shortcode handling is just-in-time deferred to run after `wpautop`, there is no need to retain the presence of shortcodes to trigger legacy mode. Also updates Text widget legacy mode notice informing of Custom HTML widget.

Amends [41050].
Props westonruter, melchoyce.
Fixes #40951 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 04:17:43 +00:00
Felix Arntz 21f6d256b5 Multisite: Remove help text duplication on Edit Site screens in the network admin.
Prior to this change, the similar help tab and sidebar for these screens were all duplicated for each respective screen. This changeset introduces two internal admin functions `get_site_screen_help_tab_args()` and `get_site_screen_help_sidebar_content()` that make these available in a centralized location.

Props atanasangelovdev.
Fixes #41167.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:53:45 +00:00
Felix Arntz c939425137 Multisite: Fix a user-facing message when adding a new site with a new user as admin.
Previously the message would falsely state that the username and password would be sent to the new user. It is actually a link to set the password that they receive in the email.

Props nishitlangaliya.
Fixes #41169.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:23:43 +00:00
Felix Arntz d4607c17b7 Multisite: Improve caching in `WP_Network_Query` by ignoring the `$fields` argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same. This was already fixed for `WP_Site_Query` in [41059].

Props spacedmonkey.
Fixes #41347.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-17 20:16:47 +00:00
Aaron Jorbin 50cb2c5e28 Update autoprefixer browser support matrix
WordPress no longer supports many old old browsers: https://make.wordpress.org/core/2017/04/23/target-browser-coverage/

This also removes alot of no longer necessary CSS. It served us well, but we are never getting back together with IE8,9,10.

So, in the (paraphrased) words of Taylor Swift:

I remember when we dropped support  the first time
Saying, "This is it, I've had enough, " 'cause like
We hadn't seen many users in a month
When you said you needed flexbox. (What?)
Then you postMessage again and say
"IE8, I miss you and I swear I'm gonna change, trust me."
Remember how that lasted for a day?
I say, "I hate the box model, " we break up, you call me, "I love css-grids."
Ooh, we called it off again last night
But ooh, this time I'm telling you, I'm telling you

We are never ever ever supporting IE 8,9,10,
We are never ever ever supporting IE 8,9,10,
You go talk to EDGE, talk to my FIREFOX, talk to CHROME
But we are never ever ever ever getting back together
Like, ever...

Fixes #37651.
Props stunnedbeast, netweb, jorbin.



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


git-svn-id: http://core.svn.wordpress.org/trunk@40912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-16 01:15:46 +00:00
Adam Silverstein 499e2a0ff9 Move `sanitizeText` and `stripTags` from press this to `wp.sanitize`.
Introduce the `wp.sanitize` namespace and add two helpers for text sanitization. `stripTags` strips HTML tags from a string using regex.

Fixes #40635.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-15 15:48:46 +00:00
Felix Arntz 6625f0c551 Multisite: Introduce a `self_admin_url` filter to adjust the URL to an administration panel.
Props j.hoffmann.
Fixes #37446.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 23:01:42 +00:00
Felix Arntz af50e8eb2c Multisite: Improve caching in `WP_Site_Query` by ignoring the `$fields` argument.
Prior to this change there were two different cache keys used for the same query. That is because regardless of the `$fields` argument, the query response will be the same.

Props spacedmonkey.
Fixes #41197.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 21:25:44 +00:00
Felix Arntz df8506f523 Multisite: Use `get_network_option()` for language in `wpmu_create_blog()`.
Before this changeset, the language of a new site would always result in the language of the current network, regardless of the `$site_id` parameter passed that actually determines the network for the site. Now the correct `WPLANG` value is used in such cases.

Alongside this change, a few minor documentation changes around the function have been made to account for the current naming conventions of sites and networks.

Props spacedmonkey.
Fixes #40503.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 21:08:43 +00:00
Weston Ruter 8db1f562e6 Widgets: Add legacy mode for Text widget and add usage pointers to default visual mode.
The Text widget in legacy mode omits TinyMCE and retains old behavior for matching pre-existing Text widgets. Usage pointers added to default visual mode appear when attempting to paste HTML code into the Visual tab and when clicking on the Text tab, informing users of the new Custom HTML widget.

Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:09:43 +00:00
Weston Ruter 93637a5729 REST API: Ensure `maxwidth` and `maxheight` params are forwarded to oEmbed provider in proxy requests.
Also correct phpdoc return tag on `WP_oEmbed_Controller::get_proxy_item()` and remove dead code in oEmbed controller phpunit tests.

Amends [40628].
See #40450.
Fixes #41299.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 16:05:43 +00:00
Gary Pendergast ecec228c50 Emoji: Store the results of the `emoji_url` and `emoji_ext` filters in statics.
Previously, these filters were being run once per post, but the changes in [41043] caused them to be run once per emoji found.

We will not stand idly by while this kind of unfair performance penalty is placed on the emoji literate. The filters are now run once only, emoji aficionados everywhere can rest easy, knowing their posts will be just as performant as their emoji-less cousins.

Props ocean90 for noticing this severe oversight.
See #35293.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 12:45:44 +00:00
Gary Pendergast 0fcd27ec31 Emoji: Fix some failing unit tests in PHP 5.2 and 5.3.
- Older versions of PHP don't know how to `html_entity_decode()` emoji.
- The fall back regex was a little too broad, catching characters that aren't emoji.

See #35293.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 11:50:43 +00:00
Gary Pendergast b13bab3e53 Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.

This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.

The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.

For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.

Fixes #35293.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 05:47:49 +00:00
Drew Jaynes beb67c9512 Docs: Improve the DocBlock summary for `WP_Query::parse_orderby()`.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 15:44:41 +00:00
Drew Jaynes e1a227cf11 Docs: Document usage of the `$wpdb` global in `WP_Query::parse_search()` and `WP_Query::parse_orderby()`.
Props avinapatel.
Fixes #41313.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 15:42:44 +00:00
Sergey Biryukov e42553dbea Docs: Add a `@global` entry for `$tinymce_version` in `_WP_Editors::editor_js()`.
Props jontyravi.
Fixes #41311.
Built from https://develop.svn.wordpress.org/trunk@41040


git-svn-id: http://core.svn.wordpress.org/trunk@40890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 14:33:40 +00:00
Sergey Biryukov 8cfdf4dd3a Docs: Add a `@global` entry for `$wpdb` in `is_user_member_of_blog()`.
Props ajayghaghretiya1.
Fixes #41308.
Built from https://develop.svn.wordpress.org/trunk@41039


git-svn-id: http://core.svn.wordpress.org/trunk@40889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 13:54:41 +00:00
Boone Gorges 65e2935636 Taxonomy: Avoid duplicates when querying for terms in taxonomies registered with `$args` parameter.
[40514] introduced a bug that caused term queries to return some duplicates
when the `$taxonomies` array contained only taxonomies that were originally
registered with an `$args` array. We fix this bug by ensuring that
recursive `get_terms()` queries stop when all queried `$taxonomies` have
already been referenced.

Props bor0, atanasangelovdev.
Fixes #41010.
Built from https://develop.svn.wordpress.org/trunk@41037


git-svn-id: http://core.svn.wordpress.org/trunk@40887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 13:41:44 +00:00
Sergey Biryukov 3b9e61cdb1 Docs: Add missing `@since` tags for `WP_Post` properties and methods.
Props keesiemeijer.
Fixes #41306.
Built from https://develop.svn.wordpress.org/trunk@41036


git-svn-id: http://core.svn.wordpress.org/trunk@40886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 12:08:41 +00:00
Weston Ruter 2ca21c444e REST API: Remove `_wpnonce` value from being used in hashed oEmbed proxy cache key.
Amends [40628].
Props r-a-y, westonruter.
See #40450.
Fixes #41048.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:51:40 +00:00
Drew Jaynes 597eeb9bb8 Docs: Use a hash notation for the `$args` parameter to describe the `fields` argument in the DocBlock for `wp_get_post_terms()`.
Also, the `$taxonomy` parameter can accept either a string or array of taxonomies.

Props ohryan for the initial tip.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:21:41 +00:00
Drew Jaynes dfab72aa35 Docs: Default for the `orderby` argument in `wp_list_categories()` is actually 'name', not 'ID'.
Props uicestone.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 22:06:39 +00:00
Sergey Biryukov 581707de6c Docs: Add a `@global` entry for `$allowed_files` in `get_file_description()`.
Props div33, ajayghaghretiya1.
Fixes #41294.
Built from https://develop.svn.wordpress.org/trunk@41032


git-svn-id: http://core.svn.wordpress.org/trunk@40882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:40:40 +00:00
Sergey Biryukov 058c2c5ca4 Docs: Fix typo in `wp_suspend_cache_invalidation()` description.
Props euthelup, milana_cap.
Fixes #41301.
Built from https://develop.svn.wordpress.org/trunk@41031


git-svn-id: http://core.svn.wordpress.org/trunk@40881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:26:44 +00:00
Sergey Biryukov 86f9360280 Docs: Add a `@global` entry for `$wpdb` in `display_setup_form()`.
Props mitraval192.
Fixes #41300.
Built from https://develop.svn.wordpress.org/trunk@41030


git-svn-id: http://core.svn.wordpress.org/trunk@40880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 21:03:42 +00:00
Peter Westwood f3326b10af Tests: Rename this file to match our coding standards.
Built from https://develop.svn.wordpress.org/trunk@41029


git-svn-id: http://core.svn.wordpress.org/trunk@40879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-12 20:56:45 +00:00
Weston Ruter 37cbe7add1 Widgets: Enqueue assets needed by media and text widgets in their `_register_one()` methods.
The `WP_Widget::_register_one()` method is more guaranteed to be called as opposed to its wrapper `WP_Widget::_register()` which plugins may bypass for performance reasons.

Amends [40631], [40640].
See #35243, #32417.
Fixes #41021.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 22:47:43 +00:00
Sergey Biryukov 6724151d41 Users: Add a "View" link to users listed on the Users screen that points to the user's author archive.
Props ryanplas, johnjamesjacoby, viralsampat, Girishpanchal, xkon.
Fixes #38085.
Built from https://develop.svn.wordpress.org/trunk@41027


git-svn-id: http://core.svn.wordpress.org/trunk@40877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 13:30:44 +00:00
Sergey Biryukov a545745a54 Shortcodes: Allow using single quotes for empty value attributes.
Props enrico.sorcinelli.
Fixes #37304.
Built from https://develop.svn.wordpress.org/trunk@41026


git-svn-id: http://core.svn.wordpress.org/trunk@40876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 00:54:41 +00:00
Sergey Biryukov f75e623eae Comments: In `WP_Comments_List_Table::extra_tablenav()`, save the state of `::has_items()` to a static variable, so that the value is consistent between top and bottom navigation.
This prevents "Empty Spam" and "Empty Trash" buttons from disappearing if there's only one page of comments in Spam/Trash.

Fixes #40975.
Built from https://develop.svn.wordpress.org/trunk@41022


git-svn-id: http://core.svn.wordpress.org/trunk@40872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 23:05:40 +00:00
Adam Silverstein 5cfbf0519b Media: library grid view - improve browser history support.
Set view state properly when navigating history using the browser back/next button in the media library (grid view). Correctly handle navigating, search, image detail view and image edit mode. Also handle bookmarking/reloading.

Props kucrut, joemcgill, afercia.
Fixes #31846.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 19:08:41 +00:00
Weston Ruter 1af3aa0000 Customize: Restrict click target of menu deletion, moving to button from its container.
Props westonruter, afercia.
Fixes #40981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 18:40:44 +00:00
Andrea Fercia b8e2496645 Administration: in `WP_List_Table->pagination()`, properly concatenate CSS classes for the pagination links when `infinite_scroll` is set to true.
Props SGr33n.
See #19815.
Fixes #40003.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-09 11:12:43 +00:00
Adam Silverstein f858551592 Date/Time: Add unit tests for the `human_time_diff` function.
Verify that `human_time_diff` works as expected for minute, hour and day intervals. Test that rounding works as expected when the time difference is near the rounding margin.

Props SGr33n.
Fixes #38773.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-07 17:08:45 +00:00
Sergey Biryukov 96ceffa552 Media: Use a filename instead of a URL in image header tests to avoid triggering an outbound HTTP request causing an ImageMagick exception on some configurations.
Props danielbachhuber.
Fixes #41216.
Built from https://develop.svn.wordpress.org/trunk@41017


git-svn-id: http://core.svn.wordpress.org/trunk@40867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-07 00:07:40 +00:00
Sergey Biryukov 452871e0c3 Media: Correct the order of arguments passed to assertions in `Tests_Image_Header`.
Props danielbachhuber.
See #41216.
Built from https://develop.svn.wordpress.org/trunk@41016


git-svn-id: http://core.svn.wordpress.org/trunk@40866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 23:58:41 +00:00
Sergey Biryukov 6b0c0592de Docs: Update the DocBlock for `_WP_Editors::wp_fullscreen_html()` after [32677].
See #30949.
Built from https://develop.svn.wordpress.org/trunk@41015


git-svn-id: http://core.svn.wordpress.org/trunk@40865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 23:44:40 +00:00
Sergey Biryukov 6dc56c4558 Docs: Update the list of static variables in `wptexturize()` DocBlock after [32863].
Props ajayghaghretiya1.
Fixes #41260.
Built from https://develop.svn.wordpress.org/trunk@41014


git-svn-id: http://core.svn.wordpress.org/trunk@40864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 21:02:42 +00:00
Drew Jaynes fdaf531325 Options: Pass `$default` as a new parameter to the `pre_option_{$option}` and `pre_site_option_{$option}` filters.
This change standardizes some language in the parameter descriptions between the two hook docs in an effort to reduce confusion between the `$pre_option` pseudo-parameters and the new `$default` ones. `$pre_option` is the truthy value used to short-circuit the `get_*option()` call, `$default` is the value passed to the `get_*option()` returned in the event that 1) a short circuit isn't performed, 2) the option doesn't exist.

Props sc0ttkclark.
Fixes #41254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 15:12:44 +00:00
Weston Ruter 6b907d8437 Customize: Prevent edge case fatal error when attempting to save changes to a changeset that had previously been corrupted.
Check return value of `WP_Customize_Manager::get_changeset_post_data()` and return if error instead of assuming it is an array.

Amends [38810].
See #30937.
Fixes #41252.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 07:05:43 +00:00
Ryan McCue 51ba397e29 REST API: Fix brittle search test.
This was previously searching for the user ID, which isn't really what it was meant to do. As a result, the test can break if that number appears in any other user information.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 01:35:41 +00:00
Joe McGill 37b500c4bd Sanity check $uploaderToggler in wp.media.view.UploaderInline.
This ensures `$uploaderToggler` exists before checking length so any views
extending or scripts accessing this view, won't encounter errors that stop execution.

Props Blackbam, yahil.
Fixes #41231.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 00:41:41 +00:00
Sergey Biryukov d8c50c7a12 Menus: Make sure `current-menu-parent` and `current-menu-ancestor` classes are properly set for parent items of post type archive submenu items.
Props mrwweb, ajoah, welcher.
Fixes #39800.
Built from https://develop.svn.wordpress.org/trunk@41008


git-svn-id: http://core.svn.wordpress.org/trunk@40858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 21:31:44 +00:00
Sergey Biryukov 2ca39ce60d Docs: Add a `@global` entry for `$tinymce_version` in `_WP_Editors::default_settings()`.
Props tejas5989.
Fixes #41244.
Built from https://develop.svn.wordpress.org/trunk@41007


git-svn-id: http://core.svn.wordpress.org/trunk@40857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 18:55:44 +00:00
James Nylen 1ef845b268 Ensure that `wp-api.js` test fixtures do not change with `WP_TESTS_*` constants.
Previously, changing these constants in `wp-tests-config` would cause PHPUnit to regenerate `wp-api-generated.js` with different values.

This commit uses the existing mechanism to also "freeze" all values that would change as a result of changing these constants.

Fixes #41123.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:30:42 +00:00
Sergey Biryukov 30bad141ad Docs: Add a `@global` entry for `$wpdb` in `WP_Network_Query::get_network_ids()`.
Props afzalmultani.
Fixes #41238.
Built from https://develop.svn.wordpress.org/trunk@41005


git-svn-id: http://core.svn.wordpress.org/trunk@40855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:23:42 +00:00
Sergey Biryukov 98458cb6e3 Docs: Add a `@global` entry for `$wp_post_statuses` in `WP_Customize_Nav_Menus::make_auto_draft_status_previewable()`.
Props afzalmultani.
See #41238.
Built from https://develop.svn.wordpress.org/trunk@41004


git-svn-id: http://core.svn.wordpress.org/trunk@40854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:21:41 +00:00
Sergey Biryukov b916e8c727 Docs: Add a `@global` entry for `$wp` in `redirect_canonical()`.
Props afzalmultani.
See #41238.
Built from https://develop.svn.wordpress.org/trunk@41003


git-svn-id: http://core.svn.wordpress.org/trunk@40853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 09:19:43 +00:00
Sergey Biryukov dbba2af814 Docs: Add a `@global` entry for `$wp_widget_factory` in `WP_Customize_Widgets::get_selective_refreshable_widgets()`.
Props jankimoradiya.
Fixes #41243.
Built from https://develop.svn.wordpress.org/trunk@41002


git-svn-id: http://core.svn.wordpress.org/trunk@40852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 08:23:41 +00:00
Weston Ruter 7b28ff2f2a Customize: Fix logic to re-expand a newly inserted nav menu section after placeholder section is replaced.
Fixes todo from Menu Customizer feature plugin: https://github.com/voldemortensen/menu-customizer/commit/0f4ea4e#diff-daa55fade2253f26ccbe02f71058841cR2330
Amends [32806].
Props greuben.
See #32576.
Fixes #40997.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 00:44:41 +00:00
Weston Ruter 046fb8a987 Widgets: Let Custom HTML widget be "wide" as the Text widget is.
Also update `WP_Customize_Widgets::$core_widget_id_bases` with the new list of core widgets.

Props obenland, westonruter.
See #40907, #40951.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 21:01:41 +00:00
Boone Gorges fa2f4b047a Avoid PHP notices when checking termmeta capabilities against a non-existent term.
Previously, checks like `current_user_can( 'edit_term_meta', $term_id )`
returned the proper value, but generated a PHP notice due to the fact
that `get_term( $term_id )` could, in certain instances, return
`WP_Error` objects.

Props caercam.
Fixes #40891.
Built from https://develop.svn.wordpress.org/trunk@40999


git-svn-id: http://core.svn.wordpress.org/trunk@40849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 19:59:40 +00:00
Drew Jaynes 64cb817527 Docs: Add a missing return notation and to the DocBlock for `WP_Session_Tokens::get_instance()`.
Also adds an inline reference to the `session_token_manager` hook in the description.

Props Shelob9 for the initial patch.
Fixes #40102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 17:16:42 +00:00
Sergey Biryukov c6ab84c4c4 General: Always use colon instead of a semicolon in `switch()` control structures.
Props jrf.
Fixes #41234.
Built from https://develop.svn.wordpress.org/trunk@40997


git-svn-id: http://core.svn.wordpress.org/trunk@40847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-04 09:52:41 +00:00
Andrew Ozz 8c47285f4e TinyMCE: fix adding the `<!-- more -->` tag when the editor is inline.
Props iseulde.
Fixes #41230.
Built from https://develop.svn.wordpress.org/trunk@40996


git-svn-id: http://core.svn.wordpress.org/trunk@40846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-03 21:41:41 +00:00
Andrew Ozz dcc372e098 Customizer: improve setting the TinyMCE modals z-index.
Props westonruter, greuben.
See #41158.
Built from https://develop.svn.wordpress.org/trunk@40995


git-svn-id: http://core.svn.wordpress.org/trunk@40845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-03 21:18:44 +00:00
Boone Gorges dc35b759be Introduce `wp_get_object_terms_args` filter.
This filter allows developers to modify the arguments passed to
`wp_get_object_terms()` before the query is run.

Props enrico.sorcinelli.
Fixes #35925.
Built from https://develop.svn.wordpress.org/trunk@40994


git-svn-id: http://core.svn.wordpress.org/trunk@40844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-02 18:29:42 +00:00
Peter Wilson 2b25a87d1b Capabilities: Prevent users having the `do_not_allow` capability.
Meta capabilities use the capability `do_not_allow` to indicate a user should be blocked from performing a particular action. This ensures users can not have the capability as it would cause unexpected behaviour.

Props johnbillion.
Fixes #41059.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-02 05:16:45 +00:00
Sergey Biryukov 6fda2e67b0 Docs: Add a `@global` entry for `$wp_filter` in `wp_start_object_cache()`.
Props bhaveshkhadodara.
Fixes #41222.
Built from https://develop.svn.wordpress.org/trunk@40992


git-svn-id: http://core.svn.wordpress.org/trunk@40842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 22:13:41 +00:00
Andrew Ozz 65f1051697 TinyMCE: respect the `Disable the visual editor when writing` user setting and don't output the TinyMCE components when using `wp_enqueue_editor()`.
Fixes #40960 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40991


git-svn-id: http://core.svn.wordpress.org/trunk@40841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 21:31:47 +00:00
Andrew Ozz 16167ffe41 Text widget: bump the TinyMCE modals z-index to 500001 so they show in the Customizer.
Props greuben.
Fixes #41158 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40990


git-svn-id: http://core.svn.wordpress.org/trunk@40840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 20:33:41 +00:00
Drew Jaynes 5c075e5af7 Docs: Remove a few more superfluous `@package WordPress` and `@subpackage` notations outside of file headers missed in [40988].
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 17:11:41 +00:00
Drew Jaynes 1d95dcfa2c Docs: Remove superfluous `@package WordPress` and `@subpackage` notations used outside of file headers in a variety of core files.
Per the inline documentation standards for PHP, there should only be one `@package` and/or `@subpackage` notation per file, and only in the file header.

See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:58:42 +00:00
Drew Jaynes ae017f435a Docs: Convert an `@uses` tag in the class DocBlock for `Walker_Nav_Menu_Edit` to `@see`.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:49:40 +00:00
Drew Jaynes bd2173f42c Docs: Remove an unnecessary `@package` tag from the DocBlock for `post_preview()`.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:39:41 +00:00
Drew Jaynes ba40430e89 Docs: Add a valid return type for `post_preview()` and improve the DocBlock summary.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 16:37:42 +00:00
Boone Gorges 26fcea496d Introduce `most_used` taxonomy label, for text on 'Most Used' metabox tab.
Props mdifelice, jlambe.
Fixes #41150.
Built from https://develop.svn.wordpress.org/trunk@40984


git-svn-id: http://core.svn.wordpress.org/trunk@40834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:46:41 +00:00
Drew Jaynes 5fa2de51ef General: Ensure `$description` gets initialized in `get_the_archive_description()` if the post type archive conditional is true and the description isn't set.
Props henrywright.
See #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:23:41 +00:00
Boone Gorges cb81009729 Allow user searches to match the `display_name` field.
Props bcole808, pcarvalho.
Fixes #39643.
Built from https://develop.svn.wordpress.org/trunk@40982


git-svn-id: http://core.svn.wordpress.org/trunk@40832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 14:22:41 +00:00
Boone Gorges 6995731f12 Allow metadata to be updated via `wp_update_comment()`.
Passing an array of `comment_meta` into `wp_update_comment()` will
now update corresponding metadata. Similar functionality already
exists in `wp_insert_comment()`.

Props dshanske, kraftbj.
Fixes #36784.
Built from https://develop.svn.wordpress.org/trunk@40981


git-svn-id: http://core.svn.wordpress.org/trunk@40831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 13:36:41 +00:00
Boone Gorges def98d511a Users: Allow data to be filtered before updating or creating a user.
Props DaveFX.
Fixes #40545.
Built from https://develop.svn.wordpress.org/trunk@40980


git-svn-id: http://core.svn.wordpress.org/trunk@40830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 13:30:42 +00:00
Boone Gorges ed9d4b9408 Taxonomy: Ignore cached term value when it doesn't match the queried taxonomy.
When a cache entry is found that matches the requested `$term_id`, but
doesn't match an explicitly provided `$taxonomy`, that cache entry
should be ignored.

Props GunGeekATX.
Fixes #40671.
Built from https://develop.svn.wordpress.org/trunk@40979


git-svn-id: http://core.svn.wordpress.org/trunk@40829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 11:46:41 +00:00
Boone Gorges 848bcf3b28 Introduce `$comment_count` param for `WP_Query`.
This parameter allows querying for posts with a specific value of
`comment_count`. It is also possible to query for posts that match
a `comment_count` comparison by passing an array with 'value' and
'compare' operators (eg `array( 'compare' => '>', 'value' => 5 )`).

Props ramon fincken.
Fixes #28399.
Built from https://develop.svn.wordpress.org/trunk@40978


git-svn-id: http://core.svn.wordpress.org/trunk@40828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 11:25:44 +00:00
Drew Jaynes d6f7788935 Remove an unnecessary initialization of `$description` due to the else condition in `get_the_archive_description()`.
See [40976]. See #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:19:41 +00:00
Drew Jaynes f6b5c794bf General: Add support for the post type archive description to `get_the_archive_description()`, and thereby also `the_archive_description()`.
Props henrywright.
Fixes #38487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 05:15:46 +00:00
Drew Jaynes 0fe9fb4a16 Link Template: Clarify documentation for the `$id` parameter in `get_post_permalink()`, `get_edit_post_link()`, `edit_post_link()`, and `get_delete_post_link()`, to reflect that either a post ID or `WP_Post` object is accepted.
Separately, use `$post` for checking the post status and retrieving the page_uri in `get_post_permalink()` instead of referencing back to the original `$id` parameter.

Props GunGeekATX for the initial patch.
Fixes #40780.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 03:29:42 +00:00
Drew Jaynes 903d23be34 Users: Introduce the `manage_users_extra_tablenav` action, fired immediately outside the closing "actions" div in the Users list table tablenav.
A similar `manage_posts_extra_tablenav` hook fires in the same location and context in the Posts list table tablenav.

Props GunGeekATX, adamsilverstein.
Fixes #36990.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 03:02:41 +00:00
Drew Jaynes 25370ba481 Docs: Add a `@property-read` notation for the read-only `WP_Term::$data` property.
See [35269], #34348 and #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 17:04:40 +00:00
Drew Jaynes 4b0e64aa8c Docs: Add missing `@since`, `@access`, and `@global` notations to the DocBlock for `WP_Query::parse_search_order()`.
Props dixitadusara.
Fixes #41045.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 16:08:44 +00:00
Drew Jaynes 66e6776a5e Docs: Add full parameter and return documentation for `WP_Text_Diff_Renderer_Table::interleave_changed_lines()`.
Props coffee2code.
Fixes #38520.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 05:29:41 +00:00
Drew Jaynes b13aa27cf4 Docs: Use third-person singular verbs in the summaries for `wp_unschedule_hook()` and `wp_clear_scheduled_hook()`.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:54:41 +00:00
Drew Jaynes 36759db92e Docs: Clarify accepted types and values for `$menu` parameters in several contexts:
* `wp_nav_menu()`
* `wp_get_nav_menu_object()` and its filter `wp_get_nav_menu_object`
* `is_nav_menu()`
* `wp_delete_nav_menu()`
* `wp_get_nav_menu_items()`

Props dimadin.
Fixes #38166.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:49:40 +00:00
Drew Jaynes 7001a3cce6 Tests: Add `@method` notations to factor class DocBlocks as a way to indicate expected return types from factory methods for the benefit of IDEs.
Props jdgrimes.
Fixes #37867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:36:41 +00:00
Drew Jaynes d829ec4cf2 Docs: Provide best practice guidance for achieving parity between `$menu_slug` values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from `$menu_slug`.
At the heart of the matter, the `$menu_slug` parameter in `add_menu_page()` and `add_submenu_page()` is not sanitized with `sanitize_key()`. When the screen object is later built for the admin page, the screen ID is derived from that `$menu_slug` value, though passed through `sanitize_key()`, which can produce unexpected results in comparison check.

Changing the sanitization code to provide actual parity is out of the question at this juncture, so updating the docs to describe how to avoid this edge case is the next best option.

Props GregRoss.
Fixes #35305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 04:18:43 +00:00
Drew Jaynes af5b2ca7f5 Docs: Add more useful summaries to the DocBlocks for boolean `$is_*` properties in `WP_Query`.
Props megane9988 for the initial patch.
Fixes #34726.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 03:44:46 +00:00
Sergey Biryukov 641a4b643f Cron API: Introduce `wp_unschedule_hook()` to clear all events attached to a hook.
This complements `wp_clear_scheduled_hook()`, which only clears events attached with specific arguments.

Props arena, mordauk, jrf.
Fixes #18997.
Built from https://develop.svn.wordpress.org/trunk@40965


git-svn-id: http://core.svn.wordpress.org/trunk@40815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-30 00:22:44 +00:00
Drew Jaynes 1fb8cbe8de Docs: Don't reference non-existent hooks inline in the DocBlock descriptions for the following template functions:
* `get_index_template()`
* `get_404_template()`
* `get_author_template()`
* `get_category_template()`
* `get_tag_template()`
* `get_taxonomy_template()`
* `get_date_template()`
* `get_home_template()`
* `get_front_page_template()`
* `get_page_template()`
* `get_search_template()`
* `get_single_template()`
* `get_embed_template()`
* `get_singular_template()`
* `get_attachment_template()`

As mentioned when these dynamic hook references were originally fixed in [33274], we can't link to non-existent hooks inline because the Code Reference auto-linker won't pick up on the dynamic-ness of the hook, it'll just try to link to a hook reference that doesn't exist. In these cases, we need to be generic and provide context for the value of `$type`.

See [38418] for where the original fix was reversed. See this changeset for reversing the reversal.

Props donutz, milana_cap.

Fixes #41198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 16:05:41 +00:00
Drew Jaynes 8ccc74c054 Docs: Don't reference non-existent hooks inline in the DocBlock description for `get_archive_template()`.
Also removes extra curly braces from the dynamic hook references added in [40962] to aid future re-parsing.

See #41198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 15:47:40 +00:00
Drew Jaynes 1e32ebe87d Docs: Don't reference non-existent hooks inline in the DocBlock description for `get_post_type_archive_template()`.
Props milana_cap.
See #41198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 15:39:40 +00:00
James Nylen 8f6088ba6e REST API: Add a filter to allow modifying the response *after* embedded data is added.
Fixes #38964.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 13:17:43 +00:00
Sergey Biryukov 165807d39f Administration: In `WP_List_Table::comments_bubble()`, replace the mdash with its HTML entity for consistency with the similar code in other list tables.
Props afercia.
See #40659, #32152.
Built from https://develop.svn.wordpress.org/trunk@40960


git-svn-id: http://core.svn.wordpress.org/trunk@40810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-29 00:04:43 +00:00
Sergey Biryukov 11bae4ded3 Docs: Add a `@global` entry for `$post` variable in `wp_post_preview_js()`.
Props avinapatel.
Fixes #41194.
Built from https://develop.svn.wordpress.org/trunk@40959


git-svn-id: http://core.svn.wordpress.org/trunk@40809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-28 12:55:43 +00:00
Sergey Biryukov c6289b7440 Docs: Add missing backtick character in `export_wp()` DocBlock.
Props pbiron.
Fixes #41178.
Built from https://develop.svn.wordpress.org/trunk@40958


git-svn-id: http://core.svn.wordpress.org/trunk@40808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:58:41 +00:00
Sergey Biryukov 01a6f4d38e Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.
Props pratikgandhi, yahil.
Fixes #40659.
Built from https://develop.svn.wordpress.org/trunk@40957


git-svn-id: http://core.svn.wordpress.org/trunk@40807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:34:41 +00:00
Sergey Biryukov 25e94961b4 Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
Props Girishpanchal, yahil.
Fixes #40628.
Built from https://develop.svn.wordpress.org/trunk@40956


git-svn-id: http://core.svn.wordpress.org/trunk@40806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:27:39 +00:00
Sergey Biryukov d08982bdbc Docs: Remove inaccurate parts of `get_header`, `get_footer`, and `get_sidebar` hooks documentation.
These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.

Props desrosj.
Fixes #40892.
Built from https://develop.svn.wordpress.org/trunk@40955


git-svn-id: http://core.svn.wordpress.org/trunk@40805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 20:56:42 +00:00
Sergey Biryukov 62947553c5 Login and Registration: Prevent the `enable_login_autofocus` filter DocBlock from spilling into JS code.
Props chris@vendiadvertising.com.
Fixes #41176.
Built from https://develop.svn.wordpress.org/trunk@40954


git-svn-id: http://core.svn.wordpress.org/trunk@40804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 20:37:42 +00:00
Felix Arntz 5650910c50 Multisite: Remove full stops from radio and checkbox labels in the Network Settings screen.
This change brings consistency with the regular site administration panel settings pages: Radio and checkbox labels do not use full stops there, so those in the network administration panel should not either.

Props Ankit K Gupta.
Fixes #39319.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 19:20:40 +00:00
Drew Jaynes 78dba2fefd Docs: List out accepted values for the `$field` parameter in `get_the_author_meta()`.
Props choongsavvii.
Fixes #38258.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 18:24:40 +00:00
Drew Jaynes faab7f4533 Docs: Improve and clarify the DocBlock summary for `wpmu_log_new_registrations()`.
Props daymobrew.
Fixes #39922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-26 18:05:41 +00:00
Drew Jaynes 474711aac1 Docs: Adjust notation for the `$context` parameter in the DocBlocks for the `wp_kses_allowed_html()` function and its associated `wp_kses_allowed_html` filter.
`$context|$allowedtags` can be either a string or array.

Props bor0.
Fixes #40575.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:16:40 +00:00
Drew Jaynes 75acd01f98 Docs: Notate `format_for_editor()` as the replacement function in the DocBlock for the deprecated `wp_richedit_pre()`.
Props rabmalin.
See #41121. Fixes #40709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:10:41 +00:00
Drew Jaynes 07f01a2e10 Docs: Replace a variety of http links referenced in inline docs with their https counterparts (where possible).
Props johnpgreen.
Fixes #40732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 22:06:41 +00:00
Drew Jaynes 97ef1ca74b Docs: Add missing deprecation, introduction, and summary information to the DocBlock for `WP_Admin_Bar::recursive_render()`.
Props coffee2code.
Fixes #40840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:58:41 +00:00
Drew Jaynes 3a3e133aaf Docs: Clarify that the `$post` parameters for the `get_the_modified_date` and `get_the_modified_time` filters can also be of type `null`.
Props dlh.
Fixes #40845.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:50:40 +00:00
Drew Jaynes 30719312fb Docs: Add a clarification to the description about what the `$output` parameter in the `embed_html` filter doc represents.
Props musus.
Fixes #37752.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:46:39 +00:00
Drew Jaynes 22f76adc8c Docs: Add full documentation for members in the labels object returned by get_taxonomy_labels().
Props truongwp.
Fixes #41108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 21:42:43 +00:00
Drew Jaynes f6bf00d378 Docs: Add a note to the DocBlock for `wp_signon()` mentioning that it doesn't handle setting the current user.
Also outlines the conditions that must be met for is_user_logged_in() to work with it.

Part props SergeyBiryukov.
Fixes #28116.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 20:08:40 +00:00
Drew Jaynes de7499f88f Docs: Add full documentation for arguments accepted by `wp_get_nav_menu_items()`.
Also provide differentiation between arguments as passed to `get_posts()` vs used for ordering outputted menu items.

By and large, arguments in the `$args` array are intended to directly affect how nav_menu_item posts are retrieved. When the default ARRAY_A is used for 'output', the 'order' and 'orderby' arguments are essentially ignored, instead giving preference to a hard-coded order of 'ASC' and an orderby value derived from the non-get_posts() argument 'output_key'.

Fixes #15533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 19:37:39 +00:00
Weston Ruter b7ca48fff0 Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).
Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:48:41 +00:00
John Blackbourn a507248146 Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string.

Props tuanmh

Fixes #40230

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


git-svn-id: http://core.svn.wordpress.org/trunk@40790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:46:44 +00:00
Weston Ruter 46551a898a Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
Amends [40640].
Props timmydcrawford.
See #34115, #39994.
Fixes #40935.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:24:41 +00:00
Drew Jaynes ae690a3fdf Scripts: Correctly reference `WP_Scripts::print_extra_script()` as the replacement for the deprecated `WP_Scripts::print_scripts_l10n()` method, rather than a nonexistent global print_extra_script() function.
Props fergbrain.
See #41121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:20:41 +00:00
Drew Jaynes 4c60260c29 Docs: Fix alignment of the `$output` parameter in the hook doc for the `do_shortcode_tag` filter.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:06:22 +00:00
Peter Wilson cc82d38f47 Emoji: Fix typo in `browserSupportsEmoji()` comment.
Fairies not Faries, introduced in [40850].

Fixes #41157.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:05:42 +00:00
Weston Ruter 980f342ad6 Customize: Ensure `header_image_data` setting exists before attempting to use it.
Amends [27497].
Props Collizo4sky.
Fixes #41007.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:04:42 +00:00
Sergey Biryukov 332884f8dc Docs: Add a missing quote in `user-agent` argument description in `WP_Http::request()`.
Props ixkaito.
Fixes #41154.
Built from https://develop.svn.wordpress.org/trunk@40934


git-svn-id: http://core.svn.wordpress.org/trunk@40784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:00:42 +00:00
Drew Jaynes 82ed0bdd11 Docs: Improve description wording for `get_template_part()` in regard to overloading by child themes.
Also, update the summary to use a third-person singular verb.

Props ixmati.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:56:40 +00:00
Drew Jaynes 6146ba0b33 Docs: Clarify the description for `esc_html__()` to note that the original text will be escaped on return if there is no translation, or the text domain isn't loaded.
Props brianlayman.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:41:41 +00:00
Drew Jaynes c5da335097 Docs: Fix a typo in the description for the `get_previous_post_link()` `$link` parameter. The default value is '%title', not '%title%'.
Props kmgalanakis.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 06:20:43 +00:00
Drew Jaynes fafa1dfa07 Docs: Add more complete documentation about expected values in the `$meta` parameter for `wpmu_create_blog()`.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 05:48:45 +00:00
Drew Jaynes acea6cbad8 Improve the usefulness of several `_deprecated_function()` calls by passing known replacement functions, methods, or hooks.
Props jrf.
See #41121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 00:05:44 +00:00
Sergey Biryukov c0cf33b8f5 Import: Increase color contrast for "This importer is not installed" message on Multisite.
Remove `.not-installed-main-site` class introduced in [38075], but never used.

Props nishitlangaliya, mbootsman.
Fixes #41117.
Built from https://develop.svn.wordpress.org/trunk@40928


git-svn-id: http://core.svn.wordpress.org/trunk@40778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-24 18:07:43 +00:00
Andrew Ozz 7f6ae69843 TinyMCE: fix directionality settings for RTL languages.
Props westonruter, sa3idho.
Fixes #40972 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40927


git-svn-id: http://core.svn.wordpress.org/trunk@40777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-24 09:19:43 +00:00
Weston Ruter a46d94efeb Widgets: Rename "HTML Code" widget to "Custom HTML" widget.
Correspondingly renames files, ID base from `html_code` to `custom_html`, and the filter from `widget_html_code_content` to `widget_custom_html_content`.

See #40907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-24 00:00:45 +00:00
Sergey Biryukov cf458a871d Docs: Document `tags_input` parameter in `wp_insert_post()`.
Props barryceelen.
Fixes #41137.
Built from https://develop.svn.wordpress.org/trunk@40925


git-svn-id: http://core.svn.wordpress.org/trunk@40775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-23 21:27:44 +00:00
Boone Gorges 779788d8d6 When querying for terms, do not assume that `$taxonomies` is a 0-indexed array.
In [25108], the logic of term queries was modified to avoid assuming
that the `taxonomies` array was numerically indexed. See #23506. This
fix was inadvertantly reverted during the refactor in [25162].

Props david.binda.
Fixes #41113.
Built from https://develop.svn.wordpress.org/trunk@40924


git-svn-id: http://core.svn.wordpress.org/trunk@40774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-23 02:06:42 +00:00
Boone Gorges 8951af8ebb Introduce `loop_no_results` action.
This action fires when a `WP_Query` query returns no results.

Props mgibbs189.
Props #40850.
Built from https://develop.svn.wordpress.org/trunk@40923


git-svn-id: http://core.svn.wordpress.org/trunk@40773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-23 01:55:44 +00:00
Drew Jaynes 3a6985de96 Docs: Standardize and add missing deprecation notations in DocBlocks for the following functions:
* `post_form_autocomplete_off()`
* `_rotate_image_resource()`
* `_flip_image_resource()`
* `wp_get_sites()`
* `deactivate_sitewide_plugin()`

Props jrf.
See #41121.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-22 17:48:45 +00:00
Boone Gorges 2ebc1fb143 Cache results in `get_objects_in_term()`.
This helps to reduce database queries when generating nav menus.

Props spacedmonkey.
Fixes #37094.
Built from https://develop.svn.wordpress.org/trunk@40921


git-svn-id: http://core.svn.wordpress.org/trunk@40771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-22 03:19:44 +00:00
Boone Gorges 8ca91024e8 Improve cache invalidation when splitting shared terms.
This changeset addresses two related issues:

* When splitting shared terms from hierarchical taxonomies, the process of regenerating the taxonomy hierarchy (`_get_taxonomy_hierarchy()`) requires recursive calls to `get_terms()` in order to descend the tree. By waiting until all shared terms in a term group have been invalidated before regenerating their taxonomy hierarchies, we avoid certain race conditions.
* Previously, a coding error prevented single-term caches from being invalidated for children of split terms. This error dates from [31418].

See #37189.
Built from https://develop.svn.wordpress.org/trunk@40920


git-svn-id: http://core.svn.wordpress.org/trunk@40770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-21 04:12:44 +00:00
Boone Gorges 989427d598 Introduce `clean_taxonomy_cache()` function.
Previously, taxonomy-wide caches were cleaned only inside of
`clean_term_cache()`. This made it hard to clean taxonmy caches
in isolation from specific taxonomy terms.

Props spacedmonkey.
See #37189.
Built from https://develop.svn.wordpress.org/trunk@40919


git-svn-id: http://core.svn.wordpress.org/trunk@40769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-21 04:04:41 +00:00
Boone Gorges f730861b90 Use `WP_Term_Query` when transforming tax queries.
This change allows tax query transformations to be cached.

Props spacedmonkey.
Fixes #37038.
Built from https://develop.svn.wordpress.org/trunk@40918


git-svn-id: http://core.svn.wordpress.org/trunk@40768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-21 03:57:42 +00:00
Sergey Biryukov 3a190792ba Docs: Add missing `@param` and `@return` descriptions for `has_term_meta()`, `wp_delete_category()`, and `wp_term_is_shared()`.
Props keesiemeijer.
Fixes #41096.
Built from https://develop.svn.wordpress.org/trunk@40917


git-svn-id: http://core.svn.wordpress.org/trunk@40767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-20 18:28:46 +00:00
Boone Gorges 92175dbd33 Add term meta support to XML-RPC `addTerm` and `editTerm` endpoints.
This changeset also includes the new function `has_term_meta()`, a
counterpart to `has_meta()` (for posts).

Props enrico.sorcinelli.
Fixes #35991.
Built from https://develop.svn.wordpress.org/trunk@40916


git-svn-id: http://core.svn.wordpress.org/trunk@40766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-18 10:40:46 +00:00
Peter Wilson 395ff7aebe Docs: Add `wp-admin/js/media.js` documentation.
Props jipmoors, jjcomack, diedeexterkate.
Fixes #41072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 15:37:53 +00:00
Peter Wilson 952975fd0d Docs: Add `wp-admin/js/custom-background.js` documentation.
Props jipmoors.
Fixes #41067.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 13:24:41 +00:00
Sergey Biryukov c569080cd1 Docs: Add documentation for `wp-admin/js/comment.js`.
Props ireneyoast, andizer, jipmoors.
Fixes #41065.
Built from https://develop.svn.wordpress.org/trunk@40913


git-svn-id: http://core.svn.wordpress.org/trunk@40763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 13:02:40 +00:00
Sergey Biryukov 3abb3087df Docs: Correct parameter description for `posts_join` filter.
Props anhskohbo.
Fixes #40991.
Built from https://develop.svn.wordpress.org/trunk@40912


git-svn-id: http://core.svn.wordpress.org/trunk@40762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:46:41 +00:00
Sergey Biryukov e441ee48d2 I18N: Add `@global` entry for `$wp_locale` in `wp_maybe_decline_date()`.
Props Dency.
Fixes #41046.
Built from https://develop.svn.wordpress.org/trunk@40911


git-svn-id: http://core.svn.wordpress.org/trunk@40761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:24:41 +00:00
Sergey Biryukov d14cc278ff Editor: Correct `$settings` parameter description in `_WP_Editors::editor()`.
Props truongwp.
Fixes #40963.
Built from https://develop.svn.wordpress.org/trunk@40910


git-svn-id: http://core.svn.wordpress.org/trunk@40760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:19:40 +00:00
Sergey Biryukov f1740f3702 I18N: Correct translator comment for response error message in `WP_Community_Events::get_events()`.
Props Soean, tfirdaus.
Fixes #40939.
Built from https://develop.svn.wordpress.org/trunk@40909


git-svn-id: http://core.svn.wordpress.org/trunk@40759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:07:41 +00:00
Sergey Biryukov 0990313c25 Twenty Sixteen: Allow category display in post preview even when there is only one category.
Props lancewillett, davidakennedy.
Fixes #39531.
Built from https://develop.svn.wordpress.org/trunk@40908


git-svn-id: http://core.svn.wordpress.org/trunk@40758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:06:41 +00:00
John Blackbourn a72ec29c4d General: Introduce a `wp_is_mobile` filter for controlling whether a request should be treated as coming from a mobile device.
Props PressLabs

Fixes #41023

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


git-svn-id: http://core.svn.wordpress.org/trunk@40757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:05:42 +00:00
John Blackbourn 523b08600f Database: Add documentation for the allowed `utf8mb4_520` value when detecting features with `wpdb::has_cap()`.
Props rcutmore

Fixes #41044

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


git-svn-id: http://core.svn.wordpress.org/trunk@40756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 12:00:43 +00:00
Sergey Biryukov 4398862f3d I18N: Add context for News blog URL in 'WordPress Events and News' dashboard widget.
Props zodiac1978.
Fixes #40929.
Built from https://develop.svn.wordpress.org/trunk@40905


git-svn-id: http://core.svn.wordpress.org/trunk@40755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 11:52:43 +00:00
Dominik Schilling 6a3be0ea29 Twenty Seventeen: Remove/merge unused variables in content-front-page.php.
#wceu2017

Props dingo_bastard, mariusvetrici.
Fixes #39771.
Built from https://develop.svn.wordpress.org/trunk@40904


git-svn-id: http://core.svn.wordpress.org/trunk@40754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 10:20:42 +00:00
Boone Gorges 736e6a2977 Simplify documentation for `wp_dropdown_categories()`.
Props ArnaudBan.
Fixes #41058.
Built from https://develop.svn.wordpress.org/trunk@40903


git-svn-id: http://core.svn.wordpress.org/trunk@40753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 09:39:42 +00:00
Adam Silverstein 7846cdc632 Media: Disable the edit image->replace button when no item selected.
On the edit media screen, ensure that the 'replace' button is disabled until a media item is selected. Fix an issue where clicking the button with no item selected threw a JavaScript error and failed to work.

Props timmydcrawford, subrataemfluence, psiico.
Fixes #40589.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 09:38:46 +00:00
Pascal Birchler b0fed2af63 Embeds: Update oEmbed endpoint URL for VideoPress.
Props NomNom99.
Fixes #41019.
Built from https://develop.svn.wordpress.org/trunk@40901


git-svn-id: http://core.svn.wordpress.org/trunk@40751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 05:38:45 +00:00
Drew Jaynes 39d2d9f19e Docs: Include 'parent' as an acceptable entry for the `$orderby` argument in `WP_Term_Query`.
h/t kalor.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-13 03:11:40 +00:00
Drew Jaynes fe163ec82a Docs: Clarify that `get_the_author_meta()` can also return an empty string.
h/t aurovrata.
See #41017

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


git-svn-id: http://core.svn.wordpress.org/trunk@40749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-13 02:33:42 +00:00
Drew Jaynes a64aa2115d Docs: Correct a typo in the `sort_column` argument description for `wp_page_menu()`.
h/t spacegrrl.
See #41017.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-13 01:11:43 +00:00
Andrea Fercia f28f4fc637 Accessibility: Avoid a keyboard trap on the permalink custom structure setting.
Using the `focus` event on the permalink custom structure field made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom structure setting. Instead, using click and input preserves
the original functionality when using any kind of pointing or input device.

Also changes `attr()` to `prop()`` as recommended for a `checked` property.

Fixes #40982.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-12 14:09:43 +00:00
Weston Ruter 2327afb5fe Customize: Restore right border on footer actions.
Fixes regression introduced in [40511].

Props timmydcrawford.
See #32296.
Fixes #40978.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-12 00:17:44 +00:00
Sergey Biryukov 5041510529 Docs: Remove duplicate `@return` keyword in `WP_Community_Events::get_request_args`.
Props ketuchetan.
Fixes #40973.
Built from https://develop.svn.wordpress.org/trunk@40895


git-svn-id: http://core.svn.wordpress.org/trunk@40745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-11 11:10:43 +00:00
Sergey Biryukov 678b53cb45 Docs: Add missing opening quote for 'home' in `{$type}_template_hierarchy` and `{$type}_template` filters documentation.
Props tmatsuur, truongwp.
Fixes #40962.
Built from https://develop.svn.wordpress.org/trunk@40894


git-svn-id: http://core.svn.wordpress.org/trunk@40744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-10 22:48:44 +00:00
Weston Ruter 38db73cff8 Widgets: Add widget dedicated for HTML Code, taking over this role of the Text widget.
Props westonruter, timmydcrawford.
See #40951, #35243.
Fixes #40907.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-09 23:54:42 +00:00
Weston Ruter 011d33e95b Media: Restrict appending `loop` parameter to Vimeo URLs specifically and not all external URLs in Video widget (via shortcode).
Fixes issue where Video widgets embedding external files fail to get recognized due to the presence of the `loop` param after the video filename, even though it has a recognized extension. Regardless, the `loop` param is only present to fix a Vimeo issue in ME.js 2.x.

Props timmydcrawford.
Amends [40640].
See #39686, #39994.
Fixes #40977.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-09 19:29:43 +00:00
Aaron Jorbin 9cff8ff056 About Page: update CSS with prefixes
Seconded by melchoyce.

See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 04:51:42 +00:00
Aaron Jorbin efc146a3ca Bundled Themes - Bump themes in preparation for 4.8
Change version numbers in stylesheets, fix typo in Twenty Fourteen readme and update copyright dates for themes. Twentysixteen wasn't updated this cycle.

See #40745 for changes that helped push this along.
Fixes #40905.
Props davidakennedy, mrahmadawais, maedahbatool.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 04:40:43 +00:00
Sergey Biryukov 04c688ad52 Docs: Add missing closing quote for 'Restore' in `post_row_actions` and `page_row_actions` filters documentation.
See #26397.
Built from https://develop.svn.wordpress.org/trunk@40882


git-svn-id: http://core.svn.wordpress.org/trunk@40732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 23:11:43 +00:00
Mel Choyce 1f2231fccc About: Swap out images and videos for CDN versions, and add responsive images.
Props: joemcgill, pento.
See #40721. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@40731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 22:07:40 +00:00
Dominik Schilling ec0918a6a7 Upgrade: Add `wp-includes/js/tinymce/plugins/wpembed` to `$_old_files`.
See #39513.
Fixes #40942.
Built from https://develop.svn.wordpress.org/trunk@40879


git-svn-id: http://core.svn.wordpress.org/trunk@40729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 21:32:44 +00:00
Andrea Fercia 1d34043e8c Dashboard: Better titles for the Recent Drafts widget.
- changes "Drafts" to "Your Recent Drafts" to clarify displayed drafts are the ones from the current user
- clarifies and simplifies the "View all" link

Props soniakash, sudar, bhargavbhandari90, zachwtx, johnroper100, rcutmore.
Fixes #37595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-05 12:00:43 +00:00
Adam Silverstein c7f7e76515 Media: Fix an issue selecting media when clicking item edges.
Adjust targeting of the click handler for media item selection so clicking edges of media items properly selects them.

Props circlecube, psiico.
Fixes #40578.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-05 00:49:43 +00:00
John Blackbourn 2607373832 Build/Test Tools: I don't know how this happened.
See #39822

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


git-svn-id: http://core.svn.wordpress.org/trunk@40723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-02 14:11:42 +00:00
John Blackbourn f5230de682 Build/Test Tools: Fix PHP 5.2 compatibility for grandchild methods which expect exceptions to be raised.
This is due to `is_callable( 'parent::setExpectedException' )` not being supported on PHP 5.2 when the method being checked only exists on the grandparent class.

Props jdgrimes

See #39822

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


git-svn-id: http://core.svn.wordpress.org/trunk@40722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-02 13:18:45 +00:00
Ella Iseulde Van Dorpe ff8af70bf1 Trunk is really 4.9-alpha now
Built from https://develop.svn.wordpress.org/trunk@40871


git-svn-id: http://core.svn.wordpress.org/trunk@40721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 22:08:40 +00:00
Ella Iseulde Van Dorpe 9fed860b33 Trunk is now 4.9-alpha
Built from https://develop.svn.wordpress.org/trunk@40870


git-svn-id: http://core.svn.wordpress.org/trunk@40720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 21:48:40 +00:00
Ella Iseulde Van Dorpe 84d9597ce4 Bump version after RC2
Built from https://develop.svn.wordpress.org/trunk@40868


git-svn-id: http://core.svn.wordpress.org/trunk@40718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 21:22:40 +00:00
Ella Iseulde Van Dorpe c44ba7cfa9 Bump version for WordPress 4.8 RC2
Built from https://develop.svn.wordpress.org/trunk@40867


git-svn-id: http://core.svn.wordpress.org/trunk@40717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 20:40:45 +00:00
Dominik Schilling 55497ccfd1 I18N: Improve translator comments for strings in the community events widget.
Props dimadin, iandunn.
Fixes #40865.
Built from https://develop.svn.wordpress.org/trunk@40866


git-svn-id: http://core.svn.wordpress.org/trunk@40716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:49:42 +00:00
Dominik Schilling 7737e48a21 About: Sync tagline from about page with credits and freedoms.
See #40721.
Built from https://develop.svn.wordpress.org/trunk@40865


git-svn-id: http://core.svn.wordpress.org/trunk@40715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:24:43 +00:00
Dominik Schilling 0e82284d87 Multisite: Revert indentation of the sample page content added in [40296].
Props swissspidy.
Fixes #40895.
Built from https://develop.svn.wordpress.org/trunk@40864


git-svn-id: http://core.svn.wordpress.org/trunk@40714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:16:40 +00:00
Mel Choyce d69e67581f About: Finalize strings.
Props: bridgetwillard, jenblogs4u, michelleweber, flixos90, johnbillion, francina, voldemortensen, melchoyce.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 03:14:41 +00:00
Andrew Ozz 56101fc06a TinyMCE: Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets.
Fixes #40893.
Built from https://develop.svn.wordpress.org/trunk@40862


git-svn-id: http://core.svn.wordpress.org/trunk@40712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-31 22:04:43 +00:00
Mel Choyce 69a7ab7d37 About: Add Link Boundary video and update poster image.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-31 18:02:44 +00:00
Andrew Ozz 9799bf93f5 TinyMCE: update to 4.6.3. Fixes few more edge cases with link boundaries. Changelog: https://www.tinymce.com/docs/changelog/#version463-may302017
Fixes #40890.
Built from https://develop.svn.wordpress.org/trunk@40856


git-svn-id: http://core.svn.wordpress.org/trunk@40707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 23:35:41 +00:00
John Blackbourn 95cf5aa7c9 Build/Test Tools: Add a missing class to the PHPUnit 6 back compat.
See #39822

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


git-svn-id: http://core.svn.wordpress.org/trunk@40704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 22:07:41 +00:00
Konstantin Obenland fd77b45b57 Twenty Sixteen: Add missing binary files
They slipped through the cracks when applying/creating patches.

See [40851], #36497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 21:53:40 +00:00
Konstantin Obenland d22061139e Importing Twenty Sixteen, default theme for 2016.
Fixes #36497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 21:21:43 +00:00
Gary Pendergast 930d29f267 Emoji: Fix the flag and emoji5 tests not working correctly.
Fixes the UN flag not being correctly compared to itself, introduced in [40837].

Replaces the bearded person check with a male fairy. Emoji 5 does not have gendered bearded people, so we needed to switch it out to use the ZWJ check for a broken render.

Props peterwilsoncc for the code and commit message.
Fixes #40858.



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


git-svn-id: http://core.svn.wordpress.org/trunk@40701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-29 03:21:42 +00:00
Mel Choyce 530577a670 About: Introduce design and add link to Media Widgets API dev note.
Props: ryelle rclations melchoyce westonruter.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-27 15:04:43 +00:00
Andrew Ozz 5136fe6ca6 TinyMCE: update to the TINY-1079 (latest) branch. Fixes several edge cases including the errors thrown when moving the caret with the arrow keys around nested `<a><code>` elements.
Fixes #40874 #40868.
Built from https://develop.svn.wordpress.org/trunk@40848


git-svn-id: http://core.svn.wordpress.org/trunk@40699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-27 02:09:45 +00:00
Weston Ruter 91f544da29 Widgets: Normalize YouTube and Vimeo URLs in `video` shortcode (primarily for Video widget) to work around ME.js 2.22 bug.
Props timmydcrawford, jnylen0, westonruter.
See #32417, #39994.
Fixes #40866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-26 23:10:44 +00:00
Andrew Ozz 91090572fe Bump version after RC1.
Built from https://develop.svn.wordpress.org/trunk@40846


git-svn-id: http://core.svn.wordpress.org/trunk@40697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 20:34:41 +00:00
Matias Ventura fe37d6f1de WordPress 4.8 RC1.
Built from https://develop.svn.wordpress.org/trunk@40845


git-svn-id: http://core.svn.wordpress.org/trunk@40696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:45:42 +00:00
James Nylen 8bf130d64a Revert [40842] due to failing tests.
See #19629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:28:43 +00:00
John Blackbourn f750a800d0 REST API: In the admin area, ensure the REST API endpoint URL is forced to `https` when necessary.
In this situation, a site which uses `http` on the front end but `https` in the admin area is more likely to have a working REST API endpoint URL when used in the admin area.

Props mohanjith, westonruter, jnylen0

Fixes #36451

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


git-svn-id: http://core.svn.wordpress.org/trunk@40694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:02:41 +00:00
Mike Schroder 2117fa8cee Media: Introduce tests for `media_sideload_image()`.
Adds basic tests for `media_sideload_image()`, including testing
the return arguments.

Props westonruter, mikeschroder.
Fixes #19629.
Built from https://develop.svn.wordpress.org/trunk@40842


git-svn-id: http://core.svn.wordpress.org/trunk@40693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:01:46 +00:00
Andrew Ozz b015889bb8 About: Further polish for Under The Hood.
Props: melchoyce apmarshall obenland. General props for the About page: hedgefield reportermike.
See #40721.
Built from https://develop.svn.wordpress.org/trunk@40841


git-svn-id: http://core.svn.wordpress.org/trunk@40692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 17:53:40 +00:00
Adam Silverstein 5f411ba353 Plugins: fix regression in search input field size.
Fix a formatting regression introduced in [40792] which attempted to resize the input for mobile, see #40130.

Props leemon, juhise, voldemortensen.
Fixes #40857. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@40691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:22:42 +00:00
Konstantin Obenland 71cd7287ba Default themes: Improve styles for 4.8 widgets
Mostly adds styles for lists and mediaelement.js instances within widgets.
Adds size classname to image widget so themes can customize their display.

Props Soean, obenland, celloexpressions, ocean90, karmatosed.
Fixes #40745.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:19:42 +00:00
Konstantin Obenland 25c2b2cab7 About: Further polish for feature descriptions.
Also adds Under The Hood content.

Props apmarshall, azaozz, iandunn, bridgetwillard, melchoyce.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:11:42 +00:00
Peter Wilson 03f483215d Emoji: Add Emoji 5 support.
Updates Twemoji to 2.3.0 to include Emoji 5 support.

The pride flag test is replaced with a test for the English flag, a five character sub-devision locale. The UN flag test is retained as the most recent two character locale.

An Emoji 5 "bearded person" replaces both Emoji 4 tests.

Fixes #40858.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 07:18:45 +00:00
Weston Ruter bb2e8b0d63 Widgets: Ensure that audio and video files appear in media library browser upon upload.
Props timmydcrawford.
Amends [40640].
See #32417, #39994, #39995.
Fixes #40803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 03:20:41 +00:00
Weston Ruter 8307924de6 Widgets: Supply missing descriptions for instance schema fields in media widgets.
Reuse translated strings from media templates.

Amends [40640].
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 02:59:44 +00:00
Andrew Ozz a8309f80c3 TinyMCE: update to 4.6.2. Changelog: https://www.tinymce.com/docs/changelog/#version462-may232017.
Fixes #40859 #40756.
Built from https://develop.svn.wordpress.org/trunk@40834


git-svn-id: http://core.svn.wordpress.org/trunk@40685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 01:14:43 +00:00
Weston Ruter 478d7730b6 Widgets: Prevent multiple items from being selectable when first populating a media widget.
Amends [40640].
Props obenland, timmydcrawford.
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-24 05:31:42 +00:00
Konstantin Obenland 92d6abac47 Themes: Skip tests if ReflectionMethod::setAccessible is unavailable
See [40825].

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


git-svn-id: http://core.svn.wordpress.org/trunk@40683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 22:16:42 +00:00
Konstantin Obenland 265787774e Themes: More unit tests for Custom Header
Custom Header functionality is largely untested. This adds tests for existing
behavior as well as changes introduced in [39227].

Props bradyvercher.
See #38639.
Fixes #39241.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 20:56:41 +00:00
Adam Silverstein 5cc6c39430 Themes: improve browser history support on new themes page.
When closing the theme preview, restore the previously selected tab. Avoid an issue where duplicate entries in the history prevented navigation. When re-opening the preview, remove bound event handlers before re-adding them.

Props afercia.
Fixes #36613.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 20:32:44 +00:00
Andrea Fercia 3aabc09e9c Administration: Fix some HTML validation errors.
Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from `rel="permalink"` to `rel="bookmark"`.

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 17:58:43 +00:00
Sergey Biryukov da0a505497 Administration: Update the docs for `wp_check_browser_version()`.
Correct `update_url` key name, add missing `platform` key.

Props coffee2code.
Fixes #40839.
Built from https://develop.svn.wordpress.org/trunk@40822


git-svn-id: http://core.svn.wordpress.org/trunk@40679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 00:17:42 +00:00
Weston Ruter 6e935e7f20 Widgets: Further refine WP JS coding style in media widgets code.
Props afercia.
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 22:05:42 +00:00
Weston Ruter e083a1aff7 Post-4.8 Beta 2 bump.
Built from https://develop.svn.wordpress.org/trunk@40820


git-svn-id: http://core.svn.wordpress.org/trunk@40677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 21:43:42 +00:00
Weston Ruter 979677bcfb WordPress 4.8 Beta 2 ([40807] again)
Built from https://develop.svn.wordpress.org/trunk@40819


git-svn-id: http://core.svn.wordpress.org/trunk@40676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 21:14:40 +00:00
Andrea Fercia 2cbd9cf75e Themes: Improve the theme Custom Logo accessibility.
Uses the Site title as fallback value for the Custom Logo alt attribute when the original alt attribute is empty.

Props sami.keijonen, joedolson, sstoqnov, nobremarcos, gma992, LiamMcArthur, jjcomack.
Fixes #38768.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 20:29:42 +00:00
Andrea Fercia bdad500af7 Widgets: Remove the title attributes used in the Tag cloud widget.
- improves accessibility using an aria-label attribute to match the information conveyed visually with the one exposed to assistive technologies
- adds an option in the widget to display the item counts, consistently with what other widgets already do (Archives, Categories)

Props adamsoucie, emirpprime, Samantha Miller., MikeLittle, rianrietveld, sami.keijonen, adamsilverstein, westonruter, afercia.
See #24766.
Fixes #35566.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 20:24:41 +00:00
James Nylen 252ab08d88 REST API: Fix changing parameters with `set_param()` for some requests.
Prior to this commit, `WP_Rest_Request::get_param()` traversed through the parameter order but `WP_Rest_Request::set_param()` did not. For JSON requests (and likely other situations as well), this meant that changing a parameter with `set_param()` would have no effect on `get_param()`.

Props TimothyBlynJacobs.
Fixes #40344.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 16:16:42 +00:00
Dominik Schilling 24a7666e69 About: Remove a stray quotation mark.
Props odysseygate.
See #40721.
Fixes #40837.
Built from https://develop.svn.wordpress.org/trunk@40814


git-svn-id: http://core.svn.wordpress.org/trunk@40672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 15:02:43 +00:00
Weston Ruter 3d9e57f534 Media: Remove core embedding support for WMV and WMA files since MediaElement.js has discontinued supporting them.
Plugins may continue to add embedding support for these file formats by re-adding them via the `wp_video_extensions` and `wp_audio_extensions` filters while also implementing fallback rendering routines via the `wp_video_shortcode_override` and `wp_audio_shortcode_override` filters.

See #39994, #39995.
Fixes #40819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 05:39:44 +00:00
Andrea Fercia b5eeb88286 Widgets: clarify some context information for translators.
Props Italian polyglots team.
Amends [40640].
See #32417, #39993, #39994, #39995.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-21 20:44:45 +00:00
Dominik Schilling 96549c5022 Widgets: Remove unused JS variable to fix JSHint error introduced in [40640].
See #39994.
Built from https://develop.svn.wordpress.org/trunk@40811


git-svn-id: http://core.svn.wordpress.org/trunk@40669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 09:45:42 +00:00
Weston Ruter 039397721e Widgets: Introduce `isHostedVideo` method on `VideoWidgetControl` to allow plugins to extend for recognizing services beyond YouTube and Vimeo.
Also update jshint configuration in Gruntfile to include the widget scripts among the JS files linted.

Props timmydcrawford.
See #39994.
Fixes #40808.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 04:18:41 +00:00
Mike Schroder db5091eaa1 Media: Decode HTML entities in `author_name` before sending to JS.
In `wp_prepare_attachment_for_js()`:
- Normalize behavior when author does not exist by returning '(no author)' for `authorName` in these cases.
- Decode HTML entities in `author_name`.
- Add tests for both of the above.

Props arshidkv12, ocean90, sloisel, mikeschroder.
Fixes #39955.
Built from https://develop.svn.wordpress.org/trunk@40809


git-svn-id: http://core.svn.wordpress.org/trunk@40667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 02:23:43 +00:00
Weston Ruter 5c671464de Revert [40807] unbumping from 4.8 Beta 2 back to Beta 1 due to aborted release.
Built from https://develop.svn.wordpress.org/trunk@40808


git-svn-id: http://core.svn.wordpress.org/trunk@40666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 23:00:43 +00:00
Weston Ruter 48578765ec WordPress 4.8 Beta 2
Built from https://develop.svn.wordpress.org/trunk@40807


git-svn-id: http://core.svn.wordpress.org/trunk@40665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 22:02:41 +00:00
Weston Ruter 123158e7d8 Widgets: Revert [40251] pending more accessible solution for showing default widget titles rather than using placeholders.
See #39909.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:45:40 +00:00
James Nylen df5b8dcc82 REST API: Avoid sending blank `Last-Modified` headers with authenticated requests.
This commit adds a new `WP_REST_Server#remove_header` method and uses it to clear the `Last-Modified` header when the "no caching" headers are sent (by default for all authenticated REST API requests).  This matches the behavior of the `nocache_headers` function used in other parts of WordPress.

Previously, the REST API would send an empty `Last-Modified` header in this situation.  Under some server and browser configurations, this causes browsers to cache authenticated REST API requests, which is undesirable.

Props iv3rson76, zinigor, rmccue, jnylen0.
Fixes #40444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:27:44 +00:00
Weston Ruter e8e5a71a85 Docs: Improve phpdoc for `WP_Customize_Manager`, `WP_Customize_Control`, `WP_Customize_Setting`, and `WP_Customize_Selective_Refresh`.
Props 4nickpick, sagarprajapati, ketuchetan, BharatKambariya, mrahmadawais, westonruter.
Fixes #39671.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:25:41 +00:00
Sergey Biryukov 2c5e9a34b2 Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine.
Props iandunn, ocean90.
See #40702.
Built from https://develop.svn.wordpress.org/trunk@40803


git-svn-id: http://core.svn.wordpress.org/trunk@40661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 19:14:42 +00:00
Sergey Biryukov a2788b09d5 Dashboard: Append the current locale to dashboard RSS widget cache key in `wp_dashboard_rss_control()`, for consistency with the changes to `wp_dashboard_cached_rss_widget()` in [33183] and [33192].
See #32804, #40702.
Built from https://develop.svn.wordpress.org/trunk@40802


git-svn-id: http://core.svn.wordpress.org/trunk@40660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 19:00:44 +00:00
Andrew Ozz a89f203b21 TinyMCE: fix selecting the link node after creating a link by pasting an URL.
Props iseulde.
Fixes #40818.
Built from https://develop.svn.wordpress.org/trunk@40801


git-svn-id: http://core.svn.wordpress.org/trunk@40659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 18:55:44 +00:00
Joe McGill 7d43d71800 Media: Ensure WP_Screen sets post type on wp-admin/upload.php.
The post type property is set to 'attachment' when on the upload screen.

Props postpostmodern.
Fixes #39509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 18:29:42 +00:00
Andrea Fercia 1a8f7ab144 Dashboard: Don't trigger an Events search when the search field is empty.
Fixes #40816.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 17:27:43 +00:00
Konstantin Obenland 92642624fd About: Optimize strings for l10n
Uses html entities for quotes and adds translator comment for event links.

Props ocean90.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 16:45:44 +00:00
Andrea Fercia e008a5c7db Themes: Improve the theme installer Favorites and Feature Filter tabs alignment.
Props nitin kevadiya, darshan02, mp518.
Fixes #40315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 16:18:41 +00:00
Konstantin Obenland 359cc45e08 Docs: Improve inline docs for inlineEditPost.
Props jjcomack, rensw90.
Fixes #39823.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 15:45:42 +00:00
Konstantin Obenland 14d0491fbf Twenty Seventeen: Remove uneccessary return statement
Props truongwp.
Fixes #40516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 15:19:41 +00:00
Andrea Fercia 36d25d3960 Dashboard: Improve the Events widget spinner position after [40789].
Props iandunn.
Fixes #40735.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 14:44:41 +00:00
Dominik Schilling 97e98a80f6 Dashboard: Use `get_user_locale()` for the news feed cache key.
Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

Props iandunn.
Fixes #40417.
Built from https://develop.svn.wordpress.org/trunk@40793


git-svn-id: http://core.svn.wordpress.org/trunk@40651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 14:36:42 +00:00
Adam Silverstein 5ddd3f92e8 Media: make search input full width on mobile.
Props abhishekfdd.
Fixes #40130.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 13:45:42 +00:00
Konstantin Obenland 34e2a6110e About: Let's get a headstart on 4.8 about strings
Strings have been reviewed and are ready for translation—design will come soon.

Props bridgetwillard, jenblogs4u, michelleweber, ryelle, melchoyce.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 11:55:44 +00:00
Andrew Ozz 7a9ce6d03f Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names.
Props iandunn coreymckrill.
Fixes #40702.
Built from https://develop.svn.wordpress.org/trunk@40790


git-svn-id: http://core.svn.wordpress.org/trunk@40648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 05:48:42 +00:00
Andrew Ozz daab579a88 Dashboard:
- Close the form after obtaining a valid location.
- Fix focusing the toggle button after closing the form.
- Fix aria attribute values.
- Fix positions in IE11.
- Some JS and CSS cleanup.

Props afercia, coreymckrill.
Fixes #40735.
Built from https://develop.svn.wordpress.org/trunk@40789


git-svn-id: http://core.svn.wordpress.org/trunk@40647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 04:01:41 +00:00
Weston Ruter bd990d7c4e Docs: Add missing `@since` tags and phpdoc descriptions to the `Custom_Image_Header` class.
Amends [27497].
Props tejas5989, riddhiehta02, westonruter.
See #21785.
Fixes #40231.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 03:53:43 +00:00
Andrew Ozz d7c37de2de Editor: When stripping paragraph tags, and there is a <br> at the beginning or the end, merge them and keep the paragraph, not the <br>.
Props rellect.
Fixes #37066.
Built from https://develop.svn.wordpress.org/trunk@40787


git-svn-id: http://core.svn.wordpress.org/trunk@40645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 22:55:42 +00:00
Andrew Ozz b398ccf2a1 TinyMCE: fix pasting while an image with caption is selected. The image and the caption should be replaced with the pasted content.
Fixes #40809.
Built from https://develop.svn.wordpress.org/trunk@40786


git-svn-id: http://core.svn.wordpress.org/trunk@40644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 22:25:41 +00:00
Weston Ruter e62f6ac8fe Widgets: Ensure title field for media widget will update with sanitized value after `change` event in addition to `input` event.
Aligns behavior of field with Text widget and other widgets whereby the server-sanitized title (via the `widget-update` request) is supplied into the field after the `change` event.

See #32417.
Fixes #40805.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 21:04:41 +00:00
Weston Ruter 698c6de4da Widgets: Use "Add Audio" for button in Audio widget instead of generic "Add File".
Props juhise.
See #39995.
Fixes #40797.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 18:34:42 +00:00
Matias Ventura aee7e6a1bf TinyMCE: Provide styles for link and code boundaries.
The new version of TinyMCE introduces a cursor-boundary feature for some formatting elements but, by default, it does not provide much in the way of styles. This tweaks their appearance in the WordPress custom skin to match the intended design of the feature.

Props joen.
Fixes #40767.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:52:42 +00:00
James Nylen 21b1135b1c REST API: Do not set `X-WP-Deprecated*` headers as often.
Only set these headers if (1) `WP_DEBUG` is enabled and (2) headers have not already been sent.

Previously, this code could generate warnings by trying to set a header after response data has already been sent.  This happens when code attached to the `shutdown` filter calls a deprecated function, for example.

Also, these headers are unlikely to be useful in the majority of cases; let's only send them if `WP_DEBUG` is enabled.

Props kraftbj, jnylen0, ocean90, rmccue.
Fixes #40787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:49:42 +00:00
Konstantin Obenland 8ef02e5ec7 Dashboard: Combine methods to retreive IP
They're only used in one place, no reason to be so verbose about it.

See #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:34:42 +00:00
Jeremy Felt fd63ede892 Multisite: Handle both role change selections in `site-users.php`.
Previously, a role selected below the list table would not apply on save. This aligns the behavior with `wp-admin/users.php` and allows role changes from both selections, deferring to the bottom selection when both are populated.

Props desrosj.
Fixes #40113.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:08:43 +00:00
Andrea Fercia 591f423132 Administration: Use consistent spacing for form elements in the Discussion Settings screen.
Props sagarjadhav.
Fixes #31594.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 15:55:44 +00:00
John Blackbourn 64d65f007d Login and Registration: Add some margin to notices on the login screen so multiple notices remain separated.
Fixes #39971

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


git-svn-id: http://core.svn.wordpress.org/trunk@40636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 15:40:41 +00:00
Konstantin Obenland 83187e8ea0 Dashboard: Document request proxy for events.
Documents the reason why the request is proxied through WP, instead of being
made directly to api.wordpress.org.

Props iandunn, michelleweber.
See #40702.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 14:44:43 +00:00
Konstantin Obenland 9bbbc719d4 Dashboard: Properly localize data for events
Moves localization to script-loader and removes dependency for two strings.

Props dd32, iandunn.
See #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 14:34:43 +00:00
Pascal Birchler bb1207cf5a Media: Correct a translatable string for MediaElement.js.
Adds the needed context to the string "None". Introduced in [38089].

Props leewillis77.
See #37394.
Fixes #40800.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 11:06:44 +00:00
Konstantin Obenland 7cae389acc Dashboard: Always pass the IP when getting events
Allows the API to determine event locations more accurately.

Props iandunn.
See #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 07:31:43 +00:00
Konstantin Obenland 71adf97a35 Upgrade: Use correct commit no. to trigger upgrade
Props iandunn.
See [40607], #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-17 22:03:46 +00:00
Weston Ruter 764d8b521f Media: Trim whitespace in URLs provided for external embeds.
Also avoid showing error notice in media widget when URL field is empty.

Props timmydcrawford, westonruter.
Fixes #40771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-17 01:59:42 +00:00
Weston Ruter 509e706c13 Customize: Run a partial's fallback behavior (full refresh) when selective refresh fails due to a script error.
This ensures that 3rd-party scripts that users paste into Text widgets will gracefully recover and result in the expected preview.

See #27355.
Fixes #40658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-17 00:01:40 +00:00
Pascal Birchler 8c7ea71edb Media: Simplify upload error message construction.
Built from https://develop.svn.wordpress.org/trunk@40736


git-svn-id: http://core.svn.wordpress.org/trunk@40594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 17:58:41 +00:00
Aaron Campbell 38347d7c58 Add nonce for updating file system credentials.
Built from https://develop.svn.wordpress.org/trunk@40723


git-svn-id: http://core.svn.wordpress.org/trunk@40581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 14:48:44 +00:00
Weston Ruter 4eb107cd52 Customize: Fix phpunit tests after [40704] due to logic inversion error.
Built from https://develop.svn.wordpress.org/trunk@40716


git-svn-id: http://core.svn.wordpress.org/trunk@40579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 14:34:42 +00:00
Dominik Schilling 3d10fef22d Customize: Igore invalid customization sessions.
Built from https://develop.svn.wordpress.org/trunk@40704


git-svn-id: http://core.svn.wordpress.org/trunk@40567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 12:07:43 +00:00
Pascal Birchler 3d95e3ae81 Adjust post meta checks
Built from https://develop.svn.wordpress.org/trunk@40692


git-svn-id: http://core.svn.wordpress.org/trunk@40555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 08:46:42 +00:00
Pascal Birchler 76d77e927b Improve redirect handling
Built from https://develop.svn.wordpress.org/trunk@40689


git-svn-id: http://core.svn.wordpress.org/trunk@40552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 08:38:42 +00:00
Pascal Birchler e88a48a066 Whitelist post arguments in XML-RPC
Built from https://develop.svn.wordpress.org/trunk@40677


git-svn-id: http://core.svn.wordpress.org/trunk@40540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 08:09:42 +00:00
Weston Ruter d8f94986b2 Customize: Keep alive auto-drafts created for page/post stubs when parent changeset is updated, and delete when changeset is garbage-collected.
Props utkarshpatel, westonruter.
See #31089.
Fixes #39715.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 05:37:44 +00:00
Weston Ruter 7f008a21de Widgets: Add missing `wp-editor-area` CSS class for `textarea` in the TinyMCE-extended Text widget to ensure proper styles are applied.
Removes extra border around TinyMCE-wrapped `textarea` and removes gap at bottom due to lack of `display:block`.

Props johnjamesjacoby, westonruter.
See #35243.
Fixes #40755.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 00:11:41 +00:00
Weston Ruter 5e67d6d81f Widgets: Remove image sizes generated during media widget phpunit tests from being version controlled.
Amends [40640].
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 22:59:42 +00:00
Weston Ruter 97e376ca39 Widgets: Ensure return value of `widget_text` filter is not dropped but passed into `widget_text_content` filter for rendering.
Amends [40631].
Props vijustin, swissspidy, westonruter.
See #35243.
Fixes #40772.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 22:36:41 +00:00
Mel Choyce 66d3a486f6 Plugins: Fix plugin name display on Chrome 58 and above.
On Chrome 58 and above, plugin names within the plugin details modal were collapsed down into an ellipsis. This fix rewrites the CSS to make sure the titles are always shown.

Props mrwweb, afercia, Presskopp.
Fixes #40579.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 20:13:42 +00:00
Weston Ruter 9cb2cbc26f Customize: Fix alignment of natural-width media buttons in site icon control.
Amends [40653].
Props afercia.
Fixes #40220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 18:51:41 +00:00
Weston Ruter 8a29b28a98 Widgets: Prevent image `title` attribute from being populated from attachment `title` by default upon selection.
Props westonruter, timmydcrawford.
See #39993.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 18:42:44 +00:00
Konstantin Obenland 68588821c3 Dashboard: Community events formatting improvements
Props Soean.
See #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 09:44:43 +00:00
Rachel Baker 580cf33c81 Taxonomy: Remove extraneous `'` included in Term delete markup.
Unmatched single quotation mark after the delete link href was introduced in r40655.

Props Chouby.
Fixes #9777.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 19:50:44 +00:00
Rachel Baker 195b227357 Formatting: Increase minimum characters allowed in `is_email()` to 6.
Brings the minimum characters expected for a valid email address to six, which matches the expectations in `wp_handle_comment_submission()` and REST API email arguments.

Props rmccue, lukecavanagh, rachelbaker, desrosj, sudar.
Fixes #38708.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 04:20:43 +00:00
Rachel Baker 9c2f5c18ce Comments: Correct the $post_id parameter passed to the 'comments_open' and 'pings_open' filters.
Fixes bug where previously the `$post_id` function argument was passed to the '_open' filters, instead of the result of the `get_post()` call. If the current post is not found, the `$post_id` filter parameter will be 0.

Props johnbillion, shulard, rachelbaker.
Fixes #40286.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 03:50:42 +00:00
Peter Wilson 62de6cc7ec Menus: Prevent empty class attribute following [40537].
Prevents an empty class attribute, `class=""`, from appearing in the HTML if a developer removes all classes using the `nav_menu_submenu_css_class` filter.

Props Kopepasah.
Fixes #36163.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 03:38:48 +00:00
Rachel Baker 868312d995 Comments: Update arguments passed to the 'comment_text' filter in `check_comment()`.
Pass null or empty values for the missing $comment and $args parameters of the 'check_comment' filter in `check_comment()`.

Props boonebgorges, vaishu.agola27, SergeyBiryukov.
Fixes #38314. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@40527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-14 03:06:45 +00:00
Andrew Ozz 48339ed3d2 Bump version after beta-1
Built from https://develop.svn.wordpress.org/trunk@40663


git-svn-id: http://core.svn.wordpress.org/trunk@40526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-13 00:21:41 +00:00
Andrew Ozz 28f2840bcb Bump version, beta-1
Built from https://develop.svn.wordpress.org/trunk@40662


git-svn-id: http://core.svn.wordpress.org/trunk@40525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 23:17:45 +00:00
Andrew Ozz 964c0710f0 Revert [40256] for now as some tests are failing in some environments.
See #20383.
Built from https://develop.svn.wordpress.org/trunk@40661


git-svn-id: http://core.svn.wordpress.org/trunk@40524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 22:50:41 +00:00
Weston Ruter 3ce794812d Widgets: Fix deferred rendering of controls for media widgets until container element fully expands.
Adds omitted call to `renderWhenAnimationDone()` which was missed when this code was copied from the Text widget.

Amends [40656].
See #40750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 22:01:42 +00:00
Adam Silverstein 498613ccd7 Media: Fix improper use of jQuery `hasClass` method.
The jQuery `hasClass` method accepts a class name without a prefix '.' (period). Remove an errant class name with a '.' in `wp-mediaelement.js` that broke the selector in certain circumstances.

Props kostasx, Presskopp.
Fixes #40354.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 20:53:45 +00:00
Adam Silverstein 8b60430aee Customizer: Fix an issue with menu classes in the customizer preview.
In customizer preview, strip changeset uuid in menu urls before comparing with current url to determine menu item classes.

In the customizer, menu items now contain a changeset uuid as part of their urls. Strip the changeset uuid off the url before comparing with current url (which lacks the changeset uuid).

Props priyankabehera155, jipmoors.
Fixes #39758.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 20:35:43 +00:00
Adam Silverstein cb2eac9e06 Users: Update name in toolbar when changing user display name.
When changing the user name in Users -> Your Profile, update the name displayed in the toolbar dynamically using JavaScript.

Props menakas, lukecavanagh, maguiar.
Fixes #40342.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 20:06:42 +00:00
Weston Ruter 020ffded1a Widgets: Defer rendering controls for media widgets until container element fully expands.
Fixes issue with MediaElement.js failing to build the player in an animating container that doesn't have established dimensions.
Also utilizes MediaElement.js for the video widget instead of using a native player.

See #32417.
Fixes #40750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 19:56:43 +00:00
Adam Silverstein d1ec180619 Taxonomy: Add a "delete" button on term edit page.
Add a 'delete' link next to the update button on the term edit screen so you can delete a term while you are reviewing it's details. 

Props cklosows, bradt, ocean90, johnbillion, DrewAPicture, ryan, MatheusGimenez, maguiar.
Fixes #9777.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 19:26:41 +00:00
Andrew Ozz 6f4a1049a8 TinyMCE: do not override `line-height` for paragraphs and headings in 4.6+, makes them hard to read.
Fixes #40743.
Built from https://develop.svn.wordpress.org/trunk@40654


git-svn-id: http://core.svn.wordpress.org/trunk@40517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 18:06:40 +00:00
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