Commit Graph

37041 Commits

Author SHA1 Message Date
Weston Ruter
c1661ecbb3 Widgets: Further refine WP JS coding style in media widgets code.
Props afercia.
See #32417.


git-svn-id: https://develop.svn.wordpress.org/trunk@40821 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 22:04:03 +00:00
Weston Ruter
a13711a3da Post-4.8 Beta 2 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@40820 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 21:42:28 +00:00
Weston Ruter
787c1a3f49 WordPress 4.8 Beta 2 ([40807] again)
git-svn-id: https://develop.svn.wordpress.org/trunk@40819 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 21:13:42 +00:00
Andrea Fercia
181ecf1ec3 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40817 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 20:28:43 +00:00
Andrea Fercia
9e969efb89 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40816 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 20:23:49 +00:00
James Nylen
5ea3c91d57 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@40815 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 16:15:25 +00:00
Dominik Schilling (ocean90)
255bd917f2 About: Remove a stray quotation mark.
Props odysseygate.
See #40721.
Fixes #40837.

git-svn-id: https://develop.svn.wordpress.org/trunk@40814 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 15:01:58 +00:00
Weston Ruter
89c103f849 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40813 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-22 05:38:05 +00:00
Andrea Fercia
2c7e409150 Widgets: clarify some context information for translators.
Props Italian polyglots team.
Amends [40640].
See #32417, #39993, #39994, #39995.


git-svn-id: https://develop.svn.wordpress.org/trunk@40812 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-21 20:43:36 +00:00
Dominik Schilling (ocean90)
e7345b18eb Widgets: Remove unused JS variable to fix JSHint error introduced in [40640].
See #39994.

git-svn-id: https://develop.svn.wordpress.org/trunk@40811 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 09:44:41 +00:00
Weston Ruter
016dc58620 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40810 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 04:17:33 +00:00
Mike Schroder
2a5f7a8901 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40809 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-20 02:23:00 +00:00
Weston Ruter
daab7c996e Revert [40807] unbumping from 4.8 Beta 2 back to Beta 1 due to aborted release.
git-svn-id: https://develop.svn.wordpress.org/trunk@40808 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 23:00:00 +00:00
Weston Ruter
9bb89011da WordPress 4.8 Beta 2
git-svn-id: https://develop.svn.wordpress.org/trunk@40807 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 22:01:02 +00:00
Weston Ruter
43ae1ccd57 Widgets: Revert [40251] pending more accessible solution for showing default widget titles rather than using placeholders.
See #39909.


git-svn-id: https://develop.svn.wordpress.org/trunk@40806 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:44:49 +00:00
James Nylen
ce38b9c90a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40805 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:26:48 +00:00
Weston Ruter
cc5e4928ff 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40804 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 20:24:58 +00:00
Sergey Biryukov
bf2de6a56b Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine.
Props iandunn, ocean90.
See #40702.

git-svn-id: https://develop.svn.wordpress.org/trunk@40803 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 19:13:59 +00:00
Sergey Biryukov
dce1c91514 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40802 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:59:58 +00:00
Andrew Ozz
33b0757fcf TinyMCE: fix selecting the link node after creating a link by pasting an URL.
Props iseulde.
Fixes #40818.

git-svn-id: https://develop.svn.wordpress.org/trunk@40801 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:54:42 +00:00
Joe McGill
11acb32acf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40800 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 18:28:58 +00:00
Andrea Fercia
99dde26730 Dashboard: Don't trigger an Events search when the search field is empty.
Fixes #40816.


git-svn-id: https://develop.svn.wordpress.org/trunk@40799 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 17:26:06 +00:00
Konstantin Obenland
cc214db09f About: Optimize strings for l10n
Uses html entities for quotes and adds translator comment for event links.

Props ocean90.
See #40721.



git-svn-id: https://develop.svn.wordpress.org/trunk@40798 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 16:44:20 +00:00
Andrea Fercia
9a5703979a Themes: Improve the theme installer Favorites and Feature Filter tabs alignment.
Props nitin kevadiya, darshan02, mp518.
Fixes #40315.


git-svn-id: https://develop.svn.wordpress.org/trunk@40797 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 16:17:41 +00:00
Konstantin Obenland
4bbc7e8cbf Docs: Improve inline docs for inlineEditPost.
Props jjcomack, rensw90.
Fixes #39823.


git-svn-id: https://develop.svn.wordpress.org/trunk@40796 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 15:44:10 +00:00
Konstantin Obenland
ec1fe1532b Twenty Seventeen: Remove uneccessary return statement
Props truongwp.
Fixes #40516.


git-svn-id: https://develop.svn.wordpress.org/trunk@40795 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 15:18:06 +00:00
Andrea Fercia
345bdb4fc8 Dashboard: Improve the Events widget spinner position after [40789].
Props iandunn.
Fixes #40735.


git-svn-id: https://develop.svn.wordpress.org/trunk@40794 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 14:43:45 +00:00
Dominik Schilling (ocean90)
83e1634d5e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40793 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 14:35:03 +00:00
Adam Silverstein
1d0cffb593 Media: make search input full width on mobile.
Props abhishekfdd.
Fixes #40130.


git-svn-id: https://develop.svn.wordpress.org/trunk@40792 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 13:44:53 +00:00
Konstantin Obenland
6e1d22936c 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@40791 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 11:54:06 +00:00
Andrew Ozz
b4d8b4db61 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40790 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 05:48:01 +00:00
Andrew Ozz
4385a4ff2e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40789 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 04:00:32 +00:00
Weston Ruter
022028ec28 Docs: Add missing @since tags and phpdoc descriptions to the Custom_Image_Header class.
Amends [27497].
Props tejas5989, riddhiehta02, westonruter.
See #21785.
Fixes #40231.


git-svn-id: https://develop.svn.wordpress.org/trunk@40788 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-19 03:52:07 +00:00
Andrew Ozz
eb5320247a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@40787 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 22:55:00 +00:00
Andrew Ozz
ee2ffd6ba2 TinyMCE: fix pasting while an image with caption is selected. The image and the caption should be replaced with the pasted content.
Fixes #40809.

git-svn-id: https://develop.svn.wordpress.org/trunk@40786 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 22:24:57 +00:00
Weston Ruter
1b702cf09c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40785 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 21:03:12 +00:00
Weston Ruter
5bfb77bc22 Widgets: Use "Add Audio" for button in Audio widget instead of generic "Add File".
Props juhise.
See #39995.
Fixes #40797.


git-svn-id: https://develop.svn.wordpress.org/trunk@40784 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 18:33:57 +00:00
Matias Ventura
379b84ce99 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40783 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:51:53 +00:00
James Nylen
50f8eff5d1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40782 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:48:38 +00:00
Konstantin Obenland
f8e0f14cf3 Dashboard: Combine methods to retreive IP
They're only used in one place, no reason to be so verbose about it.

See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40781 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:33:14 +00:00
Jeremy Felt
31db8d6cee 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40780 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 17:07:23 +00:00
Andrea Fercia
746d3c23c4 Administration: Use consistent spacing for form elements in the Discussion Settings screen.
Props sagarjadhav.
Fixes #31594.


git-svn-id: https://develop.svn.wordpress.org/trunk@40779 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 15:54:55 +00:00
John Blackbourn
6da8500524 Login and Registration: Add some margin to notices on the login screen so multiple notices remain separated.
Fixes #39971


git-svn-id: https://develop.svn.wordpress.org/trunk@40778 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 15:39:30 +00:00
Konstantin Obenland
028d76ea70 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@40777 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 14:43:47 +00:00
Konstantin Obenland
0a15718b87 Dashboard: Properly localize data for events
Moves localization to script-loader and removes dependency for two strings.

Props dd32, iandunn.
See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40776 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 14:33:04 +00:00
Pascal Birchler
043a87446d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40775 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 11:05:09 +00:00
obenland
16b7f7908f Dashboard: Always pass the IP when getting events
Allows the API to determine event locations more accurately.

Props iandunn.
See #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40774 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-18 07:30:05 +00:00
Konstantin Obenland
b549350776 Upgrade: Use correct commit no. to trigger upgrade
Props iandunn.
See [40607], #40702.


git-svn-id: https://develop.svn.wordpress.org/trunk@40773 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 22:02:02 +00:00
Weston Ruter
2dd4bc7388 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40772 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 01:58:16 +00:00
Weston Ruter
4dc737ca8e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40771 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-17 00:00:26 +00:00