Commit Graph

37167 Commits

Author SHA1 Message Date
Sergey Biryukov
da4dd8eb56 Twenty Sixteen: Replace inline control structureв to improve code readability.
Fixes #38468.

git-svn-id: https://develop.svn.wordpress.org/trunk@41343 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 06:03:09 +00:00
Sergey Biryukov
4dc1c28e57 Twenty Seventeen: Correct the @return value for twentyseventeen_post_thumbnail_sizes_attr().
Props truongwp.
Fixes #41830.

git-svn-id: https://develop.svn.wordpress.org/trunk@41342 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 04:26:55 +00:00
Sergey Biryukov
5df690648a Twenty Sixteen: Correct the @return value for twentysixteen_post_thumbnail_sizes_attr().
Props truongwp.
See #41830.

git-svn-id: https://develop.svn.wordpress.org/trunk@41341 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 04:25:59 +00:00
Konstantin Obenland
ea3507034f Widgets: Improve _doing_it_wrong message.
Adds more context to help sending developers on the path to success.

Props ramiy.
Fixes 41743.


git-svn-id: https://develop.svn.wordpress.org/trunk@41340 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-06 21:31:26 +00:00
Weston Ruter
dd7ffeb4de Widgets: Use word-wrap: break-word for available widget descriptions.
Props metodiew.
Fixes #36207.


git-svn-id: https://develop.svn.wordpress.org/trunk@41339 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-06 18:27:51 +00:00
Weston Ruter
706daad00d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41338 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-06 17:59:53 +00:00
Andrea Fercia
849cf3efb7 Themes: Prevent the Themes search field default action after [40572].
Props boonebgorges.
Fixes #41803.


git-svn-id: https://develop.svn.wordpress.org/trunk@41337 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-05 17:25:23 +00:00
Dominik Schilling (ocean90)
5f06aaca1c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41335 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 19:29:50 +00:00
Adam Silverstein
399db7ac03 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41334 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 16:00:28 +00:00
John Blackbourn
503562e03a Multisite: More specificity for the get_sites() documentation.
See #41789


git-svn-id: https://develop.svn.wordpress.org/trunk@41333 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 11:16:18 +00:00
Andrew Ozz
b1d9cac1fc Plupload: remove the reinstated plupload.js from the list of old files.
Props afercia.
See #41755.

git-svn-id: https://develop.svn.wordpress.org/trunk@41332 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 10:21:33 +00:00
Dominik Schilling (ocean90)
505709a833 Multisite: Clarify return type of get_sites() when 'count' is passed as a query var.
Fixes #41789.

git-svn-id: https://develop.svn.wordpress.org/trunk@41331 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 08:15:32 +00:00
Andrea Fercia
ba6077dc27 Docs: Update media-audiovideo.js after [41239].
Fixes #41602.


git-svn-id: https://develop.svn.wordpress.org/trunk@41330 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-03 16:15:38 +00:00
Andrea Fercia
207d79af50 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41329 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-03 16:01:18 +00:00
Andrew Ozz
55938f0664 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41328 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-01 12:27:49 +00:00
Konstantin Obenland
09182448e7 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@41327 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-01 08:49:50 +00:00
Dominik Schilling (ocean90)
f5f5359d56 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41326 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-31 12:25:14 +00:00
Sergey Biryukov
750cbcbf2c Media: Set correct value for "Link Rel" field in Image Details modal.
Props hazemnoor.
Fixes #41764.

git-svn-id: https://develop.svn.wordpress.org/trunk@41325 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-31 11:16:56 +00:00
Felix Arntz
856b9e31d5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41324 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-30 19:52:59 +00:00
Joe McGill
06329dc35e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41323 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-30 15:03:08 +00:00
John Blackbourn
2873bcd69c Docs: Clarify descriptions and parameter types for various user capability checking functions.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41322 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-29 16:42:55 +00:00
Weston Ruter
8e8969aa9c Customize: Prevent potential cache corruption when finding a secondary changeset post by UUID.
Props dlh.
Fixes #41738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41321 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-29 04:09:57 +00:00
Weston Ruter
a27cd850a2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41320 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-28 19:28:45 +00:00
Andrew Ozz
14ed6963a2 TinyMCE: fix cases where an additional empty link is created while updating an image with a link.
Props spocke.
Fixes #41259.

git-svn-id: https://develop.svn.wordpress.org/trunk@41319 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-26 16:34:00 +00:00
Sergey Biryukov
93dd8e28be Formatting: In sanitize_title_with_dashes(), convert forward slash to hyphen on save.
Props corvidism, jtsternberg, GhostToast, alxndr.
Fixes #10792.

git-svn-id: https://develop.svn.wordpress.org/trunk@41318 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 23:27:55 +00:00
Sergey Biryukov
481e055db2 Docs: Correct description for view_mode_post_types filter added in [35357].
Props birgire.
Fixes #41730.

git-svn-id: https://develop.svn.wordpress.org/trunk@41317 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 19:26:03 +00:00
Ian Dunn
a794678af4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41316 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 18:11:04 +00:00
Joe McGill
b05a22066a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41315 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 16:15:27 +00:00
Scott Taylor
c1694b35d4 Docs: improve JS docs for comment-reply.js
Props andizer, ireneyoast.
Fixes #41548.


git-svn-id: https://develop.svn.wordpress.org/trunk@41314 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:57:18 +00:00
Scott Taylor
1d4fa31a99 Docs: improve JS docs for bookmarklet.js
Props andizer, ireneyoast.
Fixes #41547.


git-svn-id: https://develop.svn.wordpress.org/trunk@41313 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:54:22 +00:00
Sergey Biryukov
fc26b6e006 Widgets: Remove a duplicate require_once() for class-wp-widget-meta.php added in [40640].
Props thingsym.
Fixes #41723.

git-svn-id: https://develop.svn.wordpress.org/trunk@41312 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:51:26 +00:00
Scott Taylor
eda1561563 Docs: improve JS docs for tags.js
Props atimmer, jipmoors.
Fixes #41069.


git-svn-id: https://develop.svn.wordpress.org/trunk@41311 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:51:19 +00:00
Scott Taylor
aec50e2859 Docs: improve JS docs for editor-expand.js
Props IreneYoast, terwdan.
Fixes #41068.


git-svn-id: https://develop.svn.wordpress.org/trunk@41310 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:47:58 +00:00
Mel Choyce
f3363250d7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41309 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-23 17:14:25 +00:00
Drew Jaynes
0549e9198a Docs: Clarify the expected usage of the $args parameter as an array in the DocBlock for apply_filters_deprecated(), including an example.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41308 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-23 15:51:21 +00:00
John Blackbourn
a6f8f9668b 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


git-svn-id: https://develop.svn.wordpress.org/trunk@41294 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 16:08:33 +00:00
John Blackbourn
e7e9e5b3fb 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


git-svn-id: https://develop.svn.wordpress.org/trunk@41293 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 15:07:42 +00:00
John Blackbourn
3eff05cb88 Widgets: Correctly strip slashes from widget and sidebar names to allow namespaced widgets to function correctly.
Fixes #27770

Props jdgrimes


git-svn-id: https://develop.svn.wordpress.org/trunk@41292 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 14:51:47 +00:00
John Blackbourn
0d407f3625 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


git-svn-id: https://develop.svn.wordpress.org/trunk@41291 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 14:22:24 +00:00
John Blackbourn
9990abec14 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 


git-svn-id: https://develop.svn.wordpress.org/trunk@41290 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 14:01:36 +00:00
John Blackbourn
8df2151660 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


git-svn-id: https://develop.svn.wordpress.org/trunk@41289 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 11:51:11 +00:00
John Blackbourn
0613540ea2 Media: Rename several attachment related parameters from $post_id to $attachment_id for clarity, and improve related
documentation.

See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41288 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 11:11:23 +00:00
Boone Gorges
04b5965866 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@41287 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-21 15:34:19 +00:00
Drew Jaynes
7157569a72 Docs: Fix a typo in the DocBlock description for add_shortcode() introduced in [41281].
Props grapplerulrich.
See #37222.


git-svn-id: https://develop.svn.wordpress.org/trunk@41286 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 20:37:47 +00:00
Drew Jaynes
c3ff721c81 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41285 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 20:12:50 +00:00
Drew Jaynes
d8c20f3a5b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41284 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 20:02:10 +00:00
Drew Jaynes
1eb7fadef4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41283 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 19:55:24 +00:00
Drew Jaynes
c93159d69c Shortcodes: Rename the $func parameter for add_shortcode() to $callback to improve clarity.
See #37222. See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41282 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 19:47:20 +00:00
Drew Jaynes
b90eb22176 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41281 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 19:43:58 +00:00
Drew Jaynes
70134f9544 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41280 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 19:22:46 +00:00