Commit Graph

36730 Commits

Author SHA1 Message Date
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