Commit Graph

3257 Commits

Author SHA1 Message Date
danielbachhuber
6c9675bf37 REST API: Handle api-request query parameters with plain permalinks.
When constructing the request URL, ensure that `?` is replaced with `&` when the API root already contains a `?`. Fixes an issue where requests were broken when sites had permalinks set to plain.

Props aduth.
Merges [42965] to the 5.0 branch.
Fixes #42382.

Built from https://develop.svn.wordpress.org/branches/5.0@43771


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 18:33:39 +00:00
Gary Pendergast
158cbdbf03 Build Tools: Copy package JavaScript and CSS into wp-includes.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Props atimmer, pento.
Fixes #45119.


Built from https://develop.svn.wordpress.org/branches/5.0@43760


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 06:06:46 +00:00
danielbachhuber
a5bd8cb64c REST API: generate a valid fallback URI in wp.api.utils.getRootURL.
When window.location.origin isn't set, correctly insert two slashes between the protocol and host when constructing the fallback URL.

Props abdullahramzan.
Merges [43566] into the 5.0 branch.
Fixes #44764.

Built from https://develop.svn.wordpress.org/branches/5.0@43757


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 20:49:25 +00:00
Sergey Biryukov
4af0279f2a Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.
Props dsifford, kadamwhite.
Merges [43593] and [43597] to the 5.0 branch.
Fixes #44832.
Built from https://develop.svn.wordpress.org/branches/5.0@43704


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:00:23 +00:00
atimmer
3810f7a3ef Build tools: Upgrade webpack to version 4.
* Minification is done by uglify, so disable that in the media build.
* The webpack boilerplate has changed, which explains the changes in the build files.
* `ModuleConcatenationPlugin` is enable by default for production builds so we don't have to specify that ourselves.

See #45065.

Built from https://develop.svn.wordpress.org/branches/5.0@43688


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:16:23 +00:00
Aaron Jorbin
dda1111bdf Build/Test Tools: Revert grunt-contrib-uglify update
Follow up to [43684].
See #45064.

Built from https://develop.svn.wordpress.org/branches/5.0@43686


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:11:25 +00:00
Aaron Jorbin
a870c7e8f3 Build/Test: Update dependencies for 5.0
Updates package dependencies to more modern versions, also adds .nvmrc and package-lock.json as followups to [43683] and [43571].

See #44600.
Fixes #45064.


Built from https://develop.svn.wordpress.org/branches/5.0@43684


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-09 02:52:45 +00:00
Andrew Ozz
6547731cfe TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
Merges [43447] to the 4.9 branch.
Fixes #44134.
Built from https://develop.svn.wordpress.org/branches/4.9@43472


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-17 10:04:26 +00:00
Gary Pendergast
cb0ea9d291 Emoji: Update Twemoji to version 11.0.
🦹

Backport of [43377] to the 4.9 branch.

Props kraftbj,
Fixes #44339.


Built from https://develop.svn.wordpress.org/branches/4.9@43444


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-13 06:37:26 +00:00
Andrew Ozz
b78d21d9f0 Privacy: add default text for a privacy policy including a tutorial on now to create one.
Insert both the text and tutorial in new policy pages and highlight is brightly in the editor.
Show only the suggested text in the policy postbox.

Props melchoyce, idea15, allendav, xkon, macbookandrew, azaozz.
Merges [43044], [43048], [43052], [43126], [43146], and [43148] to the 4.9 branch.
Fixes #43473.
Built from https://develop.svn.wordpress.org/branches/4.9@43149


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 17:59:30 +00:00
Sergey Biryukov
85d1ba9726 TinyMCE: Update to 4.7.11.
Props iseulde.
Merges [43004] to the 4.9 branch.
Fixes #43862.
Built from https://develop.svn.wordpress.org/branches/4.9@43068


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 22:31:24 +00:00
Sergey Biryukov
ee43146223 Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
Merged [43056], [43062], [43063] to the 4.9 branch.
Fixes #43820.
Built from https://develop.svn.wordpress.org/branches/4.9@43064


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 22:04:28 +00:00
Dominik Schilling
760aa16ab8 Media: Update minified version of imgAreaSelect after [42874].
Adds imgAreaSelect to the uglify grunt process.

Merge of [42930] to the 4.9 branch.

Props adamsilverstein.
See #41242.
Built from https://develop.svn.wordpress.org/branches/4.9@42932


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 19:51:37 +00:00
Adam Silverstein
4650753c6b Media: Fix image cropping on touch screen devices.
* In initCrop, handle touch events in addition to mouse events.
* In imageSelect jQuery plugin, accept event.which of 0 as provided by touch events.

Props yahil, alexgso, joemcgill.
Merges [42818] to the 4.9 branch.
Fixes #41242.


Built from https://develop.svn.wordpress.org/branches/4.9@42874


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-24 20:26:42 +00:00
Dominik Schilling
04d41666dc REST API JavaScript Client: Support an empty string for nonce to disable sending the X-WP-Nonce header.
Passing a `nonce` argument with an empty string to `wp.api.init()` now does no longer fall back to `wpApiSettings.nonce`. This makes it possible to stop sending nonce headers, for example to a read-only endpoint on another site in a multisite install.

Merge of [42852] to the 4.9 branch.

Props adamsilverstein, FPCSJames, ocean90, swissspidy.
See #42948, #43266.
Built from https://develop.svn.wordpress.org/branches/4.9@42854


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 20:04:42 +00:00
Dominik Schilling
7faddf9e50 REST API JS Client: Extend custom nonce functionality to collections.
This brings the improved nonce handling from [41553] to collections to remove the direct `wpApiSettings.nonce` dependency.

Merge of [42851] to the 4.9 branch.

Props adamsilverstein, ocean90, swissspidy.
See #43265.
Built from https://develop.svn.wordpress.org/branches/4.9@42853


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 20:00:40 +00:00
Dominik Schilling
276dbdc296 Media: Grid view - correct placeholder positioning during uploads.
Preventing contextually created attachments from being added to the grid collection in Attachments.validator. Remove the previous filtering introduced in [41937] which caused the placement issue.

Merge of [42739-42740] to the 4.9 branch.

Props lancewillett, Junaidkbr, designsimply, joemcgill.
Fixes #42968.
Built from https://develop.svn.wordpress.org/branches/4.9@42848


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 16:20:37 +00:00
Sergey Biryukov
a91c3fbdc0 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce, kristastevens for language; dmsnell for original patch; peterwilsoncc.
Merged [42648] and [42719] to the 4.9 branch.
Fixes #38332.
Built from https://develop.svn.wordpress.org/branches/4.9@42811


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 00:15:42 +00:00
Sergey Biryukov
b7df04afe4 Media: avoid page scrolling when opening the media modal.
Moves focus to a proper element within the media modal to avoid the underlying
page to scroll to the bottom. Removes the media modal `freeze` option.

Props andreiglingeanu, adamsilverstein.
Merges [42624] to the 4.9 branch.
Fixes #39859.
Built from https://develop.svn.wordpress.org/branches/4.9@42627


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 23:55:41 +00:00
Sergey Biryukov
8d9813f6f6 Customize: Ensure media playlists get initialized after selective refresh; expose new wp.playlist.initialize() API.
In particular allows audio and video playlists to be added to the Text widget and previewed.

Props bpayton, westonruter.
See #40854.
Merges [42613], [42617] to the 4.9 branch.
Fixes #42495.
Built from https://develop.svn.wordpress.org/branches/4.9@42622


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 14:56:41 +00:00
Sergey Biryukov
ff4c656579 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Really, following [42598].

Props peterwilsoncc.
Merges [42602] to the 4.9 branch.
Fixes #42862.
Built from https://develop.svn.wordpress.org/branches/4.9@42603


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:05:39 +00:00
Sergey Biryukov
09a5894a92 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Replaces the fairy (male) browser support test with a woman in business suit levitating. While the things that make people different sometimes become less obvious this isn't always a problem, because the things that make you strange are the things that make you powerful.

Props peterwilsoncc.
Merges [42598] to the 4.9 branch.
Fixes #42862.
Built from https://develop.svn.wordpress.org/branches/4.9@42601


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:55:40 +00:00
Sergey Biryukov
519f479887 Media: Fix JSHint error after [42595].
Merges [42599] to the 4.9 branch.
See #42646.
Built from https://develop.svn.wordpress.org/branches/4.9@42600


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:53:38 +00:00
Sergey Biryukov
4224f6e214 Media: Store and reuse image cropper ratio settings if available, instead of overwriting.
Props adamsilverstein.
Merges [42595] to the 4.9 branch.
Fixes #42646.
Built from https://develop.svn.wordpress.org/branches/4.9@42596


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:41:41 +00:00
Sergey Biryukov
723d0f2669 Media: Introduce a custom error handler for MediaElement.js to display a download link if a FLV file cannot be rendered for any reason.
Props Clorith.
Merges [42582] to the 4.9 branch.
Fixes #42643.
Built from https://develop.svn.wordpress.org/branches/4.9@42583


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:53:38 +00:00
Andrew Ozz
bbb8a324c7 Merged revision(s) 42576 from trunk:
TinyMCE: backport bug fixes to `NotificationManager` and `WindowManager` from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to `MultiRange` from 250675bb7b.

Props peterwilsoncc, azaozz.
Fixes #42722 for 4.9.3, see #43012.

Built from https://develop.svn.wordpress.org/branches/4.9@42577


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 19:41:42 +00:00
Sergey Biryukov
83dc4c9339 Emoji: Update Twemoji to 2.4.0.
WordPress was already on 2.5.0, but Twemoji decided to break their versioning, so 2.4.0 is actually the latest release.

Merges [42566] to the 4.9 branch.
Fixes #42862.
Built from https://develop.svn.wordpress.org/branches/4.9@42567


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:51:41 +00:00
Aaron Jorbin
c4277abb33 Remove JSHint due to license compatibility
Backports [42547] without adding new files due to how minor updates work.

JSHint inherits a license from JSLint that includes the clause "The Software shall be used for Good, not Evil." WordPress's license specifically allows grants the freedom to run the program, for any purpose. Please note, this is not an encouragement of evil. Rather than doing something evil, how about learning to love those around you. Instead of tweeting lies and saying people are "Not Good!", help your neighbor. In the words of Lin Manual Miranda, "Love is love is love is love is love is love is love is love, cannot be killed or swept aside."

This replaces JSHint with esprima, a part of the larger jQuery project, and a custom wrapper for some basic error checking within codemirror.

The existing JSHint configuration is kept in place in case someone wants to use that, but they can only do so for Good.

Fixes #42850
Props netweb for a spelling fix on a comment.

Built from https://develop.svn.wordpress.org/branches/4.9@42548


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 03:38:41 +00:00
Dion Hulse
e77f8257ea External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Merges [42462] to the 4.9 branch.
Fixes #42720 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42465


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:41:51 +00:00
Sergey Biryukov
b8ebacbf82 Editor: Link suggestions: add fallback title for posts with no title.
Props afercia.
Merges [42425] to the 4.9 branch.
Fixes #42664.
Built from https://develop.svn.wordpress.org/branches/4.9@42439


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-12 20:13:38 +00:00
Weston Ruter
160e61fddf Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode.
See #40854.
Amends [41985].
Props aduth.
Fixes #42416 for 4.9.

Built from https://develop.svn.wordpress.org/branches/4.9@42391


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 05:19:40 +00:00
Weston Ruter
35b40d1001 Editor: Re-build tinymce.min.js after [42191].
See #42553.

Built from https://develop.svn.wordpress.org/branches/4.9@42194


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 23:36:39 +00:00
Konstantin Obenland
99c19a5a82 Codemirror: Unify line endings in csslint.js
This is likely a problem caused upstream and will probably be a non-issue once #41870 is merged in a future release.

Fixes #42424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 22:31:47 +00:00
Weston Ruter
fbee634ac7 Customize: Prevent history.replaceState() and history.pushState() calls from causing error in customize preview before DOM ready.
Amends [41597].
See #39896.
Fixes #42414.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-02 19:27:47 +00:00
Adam Silverstein
274792f9cd REST API: JS client - Enumerate endpoints supporting trash.
Improve the logic determining which endpoints support the trash by enumerating them. Endpoints that don't support the trash require `force=true` when deleting. The previous approach relied on the `force` argument description, which is a translated string and was fragile. In the future, we can expose whether an endpoint supports the trash as part of its schema and automate this logic.

Props Soean.
Fixes #40672.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 02:54:48 +00:00
Weston Ruter
35172737ef Customize: Support instantiation of partials with flat/unwrapped params for parity with controls, sections, and panels in [41726].
* Passing `options.params` when constructing `Partial` is now deprecated in favor of just passing `options`.
* Improve usage of jsdoc in JS `Partial` class.
* Also add `defaults` property to `wp.customize.selectiveRefresh.Partial` class for parity with `Control`.

See #42083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-29 00:15:53 +00:00
Ella Iseulde Van Dorpe
abc1579a42 TinyMCE: Set undefined FloatPanel zIndex
See [40995] for the Customizer.
Fixes #42322.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 16:52:56 +00:00
Weston Ruter
9093718b15 Editor: Specify maxwidth in parse-embed requests based on width of editor iframe so that TinyMCE view embeds fit, particularly in Text widgets.
See #40854, #34115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-24 04:07:50 +00:00
Joe McGill
d21f6799a6 Customizer: Improve handling of crops in the media library.
This is a follow up on r41732, implementing the following improvements:

* Attachment parent info is now stored in attachment meta rather than a 
separate post meta key.
* Attachments created from contextual crops (e.g. header, logos, etc.) are
filtered out of the media library using a new `_filterContext` method in
`wp.media.controller.Library`.

Props joemcgill, westonruter.
See #21819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-19 04:18:47 +00:00
Weston Ruter
b4edf21599 Media: Add missing mediaelement-migrate.js script to get uglified.
Amends [41877].
See #42189, #39686.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 02:26:48 +00:00
Weston Ruter
955d5b0ab1 Widgets: Prevent MediaElement.js player from overflowing sidebar in Audio widget.
Props bradyvercher.
See #39686.
Fixes #42244.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 23:02:47 +00:00
Weston Ruter
2e602a8560 Media: Add MediaElement.js 2.2 back-compat for MediaElement.js 4.2
* Introduces `mediaelement-migrate.js`.
* Upgrades ME.js from 4.2.5-74e01a40 to 4.2.6-78496d1.

Props rafa8626, bradyvercher.
See #39686.
Fixes #42189.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 18:07:52 +00:00
Weston Ruter
4150e805d7 Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.
* Ensure that changes to captions are shown in preview when modified in media modal.
* Also keep `wp.customize.widgetsPreview.renderedWidgets` updated when widgets are added or removed.

See #41914, #37887, #40403.
Fixes #41979.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-16 06:46:48 +00:00
Weston Ruter
12f647679b Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 22:23:47 +00:00
Adam Silverstein
59c3c7ae14 Media Grid: Fix escape key sometimes failing to close details modal.
Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.

Props subrataemfluence, afercia.
Fixes #42180.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:21:49 +00:00
Weston Ruter
434e3aba82 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:01:46 +00:00
Mel Choyce
f44ed386c1 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:55:46 +00:00
Weston Ruter
132c847087 Customize: Ensure customized changes pending to be written into changeset are successfully injected into Ajax requests in preview.
Amends [40704].
See #42162.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 04:51:47 +00:00
Weston Ruter
ef1c95ff91 Customize: Constrain focus when overlay notification is displayed.
* Restore previously-focused element when overlay notifications are dismissed.
* Allow notifications to be dismissed via keyboard.

Amends [41667].
See #42110, #35210, #39896.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 03:34:53 +00:00
Weston Ruter
35b5c9e762 Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in top window.
* Open the door for future browser history feature in #28536, which is currently not feasible when customize-loader is used.
* Remove customizer-loader from being used on admin screens for Dashboard, Themes, non-shiny theme install/update.
* Keep the customize-loader functionality available for plugins, for the time being. It may become deprecated.
* Ensure `return` param in customizer links in Themes screen update to reflect `search` updated by `pushState`.
* Persist `return` when reloading Customizer due to theme switch, autosave restoration, or changeset trashing.
* Use `location.replace()` instead of changing `location.href` when trashing.
* Hide theme browser while Themes screen is loading when there is a `search` to prevent flash of unfiltered themes.
* Use throttling instead of debouncing when searching themes to ensure that screen is updated immediately on page load.
* Fix encoding and decoding of `search` param between URL and search field.
* Add support for dismissing autosaves when closing customize-loader, when it is used by plugins.
* Skip sending changeset UUID to customize-loader for population in browser location if changeset branching is not enabled.

See #28536.
Fixes #40254.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-09 16:04:48 +00:00