Commit Graph

36680 Commits

Author SHA1 Message Date
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
Pascal Birchler 8b07508cae Media: Simplify upload error message construction.
git-svn-id: https://develop.svn.wordpress.org/trunk@40736 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 17:57:37 +00:00
Aaron D. Campbell 96c3a01019 Add nonce for updating file system credentials.
git-svn-id: https://develop.svn.wordpress.org/trunk@40723 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 14:47:08 +00:00
Weston Ruter fe789a2644 Customize: Fix phpunit tests after [40704] due to logic inversion error.
git-svn-id: https://develop.svn.wordpress.org/trunk@40716 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 14:33:16 +00:00
Dominik Schilling (ocean90) eedf5b2a60 Customize: Igore invalid customization sessions.
git-svn-id: https://develop.svn.wordpress.org/trunk@40704 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 12:06:32 +00:00
Pascal Birchler 1a25b3f43e Adjust post meta checks
git-svn-id: https://develop.svn.wordpress.org/trunk@40692 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:45:18 +00:00
Pascal Birchler 8278c5ee9c Improve redirect handling
git-svn-id: https://develop.svn.wordpress.org/trunk@40689 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:37:34 +00:00
Pascal Birchler 4fa44333cb Whitelist post arguments in XML-RPC
git-svn-id: https://develop.svn.wordpress.org/trunk@40677 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 08:08:27 +00:00
Weston Ruter 77fe870bd5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40676 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 05:36:25 +00:00
Weston Ruter 8eade12087 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@40675 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-16 00:10:42 +00:00
Weston Ruter 556e793ed6 Widgets: Remove image sizes generated during media widget phpunit tests from being version controlled.
Amends [40640].
See #32417.


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



git-svn-id: https://develop.svn.wordpress.org/trunk@40673 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-15 22:35:41 +00:00