Commit Graph

3273 Commits

Author SHA1 Message Date
Andrew Ozz
c5d13c5934 Privacy: change how the default text for privacy policy is added:
- 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, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43146


git-svn-id: http://core.svn.wordpress.org/trunk@42975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 17:13:21 +00:00
atimmer
21e770973c Docs: Improve JSDoc for wp-includes.js/wpdialog.js.
Props igorsch, LisanneKluitmans, manuelaugustin.
Fixes #43947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 15:27:21 +00:00
atimmer
395cad7d83 Docs: Improve JSDoc for js/wp-emoji-loader.js.
Props nicollle, dfangstrom, Igorsch.
Fixes #43870.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 15:09:21 +00:00
atimmer
b6ef716d97 Docs: Improve JSDoc for media/controllers/gallery-edit.js.
Amends [43141] - includes the built media files.

See #43866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 14:48:22 +00:00
Andrew Ozz
3266b10d04 Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43056


git-svn-id: http://core.svn.wordpress.org/trunk@42885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 15:43:22 +00:00
Andrew Ozz
c21c4e25b3 Privacy: add default text for a privacy policy. First run.
Props xkon, idea15, allendav, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43044


git-svn-id: http://core.svn.wordpress.org/trunk@42873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:47:21 +00:00
Ella Iseulde Van Dorpe
6e215cae48 TinyMCE: Update to 4.7.11
Built from https://develop.svn.wordpress.org/trunk@43004


git-svn-id: http://core.svn.wordpress.org/trunk@42833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 22:35:21 +00:00
atimmer
c1754d9ac1 Docs: Improve JSDoc for wp-includes/js/wp-backbone.js.
Changes some additional docs after [42993].

Props birgire, adamsilverstein, netweb.
Fixes #35465.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-22 14:37:21 +00:00
atimmer
bb8d67e6ea Docs: Improve JSDoc for wp-includes/js/wp-backbone.js.
Props ericlewis, gma992, adamsilverstein.
Fixes #35465.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 14:02:22 +00:00
Adam Silverstein
b76da1fdf3 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.
Fixes #42382.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-09 13:10:31 +00:00
Dominik Schilling
f33092e163 Media: Update built files after [42798].
See #43500.
Built from https://develop.svn.wordpress.org/trunk@42931


git-svn-id: http://core.svn.wordpress.org/trunk@42761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 19:49:30 +00:00
Dominik Schilling
eab5e4bb82 Media: Update minified version of imgAreaSelect after [42874].
Adds imgAreaSelect to the uglify grunt process.

Props adamsilverstein.
Fixes #41242.
Built from https://develop.svn.wordpress.org/trunk@42930


git-svn-id: http://core.svn.wordpress.org/trunk@42760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-03 19:46:30 +00:00
Dominik Schilling
6fd9d2edcf 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.

Props adamsilverstein, FPCSJames, ocean90, swissspidy.
Fixes #42948, #43266.
Built from https://develop.svn.wordpress.org/trunk@42852


git-svn-id: http://core.svn.wordpress.org/trunk@42682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:21:30 +00:00
Dominik Schilling
3138d89e1e 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.

Props adamsilverstein, ocean90, swissspidy.
Fixes #43265.
Built from https://develop.svn.wordpress.org/trunk@42851


git-svn-id: http://core.svn.wordpress.org/trunk@42681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:04:30 +00:00
Adam Silverstein
e70caa19a1 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.
Fixes #41242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:27:31 +00:00
Andrea Fercia
48077799d9 Accessibility: Insert Link modal: Improve keyboard interaction.
Avoids to change the selected link when using the Shift and Up/Down arrow keys
to select text in the form fields.

Fixes #43253.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 20:58:30 +00:00
Sergey Biryukov
3812402cc7 Docs: Fix typo in wp.customize.selectiveRefresh.placements() description.
Props Nikschavan.
Fixes #43418.
Built from https://develop.svn.wordpress.org/trunk@42754


git-svn-id: http://core.svn.wordpress.org/trunk@42584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 17:52:31 +00:00
Adam Silverstein
a299c5c344 Fix eshint error since r42739.
Remove a trailing comma in [42739] that was throing a jshint error.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:49:30 +00:00
Adam Silverstein
da89d20c39 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.

Props lancewillett, Junaidkbr, designsimply, joemcgill.
Fixes #42968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:41:31 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
atimmer
5e190dc084 Docs: Improve JSDoc for media/views/spinner.js.
Amends r42675 - includes the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 15:45:30 +00:00
Peter Wilson
0d39b35c11 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 for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
Andrea Fercia
a7c89d5761 Administration: CSS coding standards: use double quotes for values that require quotes.
As per the WordPress CSS coding standards, CSS properties with values that require quotes must use double quotes.
Also fixes some indentation and spacing.

Fixes #43220.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-03 13:19:32 +00:00
Andrea Fercia
d6a73ef110 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.
Fixes 39859.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 17:03:33 +00:00
Weston Ruter
1829a2ce27 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.
Fixes #42495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-29 23:56:29 +00:00
Peter Wilson
6bb7fcebf4 Emoji: Update Emoji browser support tests for Twemoji v2.4.0
Really, following [42598].

Fixes #42862 for trunk, really.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 22:02:30 +00:00
Sergey Biryukov
a1121f1def Media: Fix JSHint error after [42595].
See #42646.
Built from https://develop.svn.wordpress.org/trunk@42599


git-svn-id: http://core.svn.wordpress.org/trunk@42428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:51:31 +00:00
Peter Wilson
891c8255c3 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.

Fixes #42862 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:47:30 +00:00
Sergey Biryukov
365c70d415 Media: Store and reuse image cropper ratio settings if available, instead of overwriting.
Props adamsilverstein.
Fixes #42646.
Built from https://develop.svn.wordpress.org/trunk@42595


git-svn-id: http://core.svn.wordpress.org/trunk@42424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 21:36:31 +00:00
Sergey Biryukov
3429cfeabe 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.
Fixes #42643.
Built from https://develop.svn.wordpress.org/trunk@42582


git-svn-id: http://core.svn.wordpress.org/trunk@42411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-24 01:51:30 +00:00
Andrew Ozz
84cdc05c58 TinyMCE: backport bug fixes to NotificationManager and WindowManager from d1877933fa (diff-2e5c98d81ce2481aa1042b2320728b65) and to MultiRange from 250675bb7b.
Props peterwilsoncc, azaozz.
Fixes #42722 for trunk, see #43012.
Built from https://develop.svn.wordpress.org/trunk@42576


git-svn-id: http://core.svn.wordpress.org/trunk@42405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 19:35:31 +00:00
Sergey Biryukov
d9a535ee13 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.

Fixes #42862.
Built from https://develop.svn.wordpress.org/trunk@42566


git-svn-id: http://core.svn.wordpress.org/trunk@42395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:49:30 +00:00
Aaron Jorbin
9efeb545c0 Remove JSHint due to license compatibility
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/trunk@42547


git-svn-id: http://core.svn.wordpress.org/trunk@42376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 01:29:32 +00:00
Sergey Biryukov
3b73ac9eb3 Editor: Use explicit context instead of a trailing space for Edit string in TinyMCE plugins.
Props scottlee, ayubadiputra, NathanAtmoz.
Fixes #42543.
Built from https://develop.svn.wordpress.org/trunk@42523


git-svn-id: http://core.svn.wordpress.org/trunk@42352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 06:28:30 +00:00
Dion Hulse
3fe9cb61ee External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Fixes #42720 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:28:43 +00:00
atimmer
6310ad30d0 Docs: Improve JS Docs for controllers/customize-image-cropper.js.
Props manuelaugustin, bramheijmink, andizer, ireneyoast.
Fixes #43020.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-11 14:32:52 +00:00
Andrea Fercia
4e5215deec Editor: Link suggestions: add fallback title for posts with no title.
Fixes #42664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-02 18:11:52 +00:00
atimmer
02b86b8418 Docs: Improve JSDoc for customize-preview-widgets.js.
Props ireneyoast, andizer, robinvandervliet, boblinthorst.
Fixes #42954.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 15:12:49 +00:00
atimmer
f296e2cbbc Docs: Improve JSDoc for media/views/attachments.js.
Props maartenleenders, herregroen, jipmoors, ireneyoast.
Fixes #42832.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-21 14:27:52 +00:00
atimmer
f6a37e7d39 Docs: Remove @summary tags from JSDoc.
As decided in the JavaScript core chat. With a few reasons:

* It is visually cleaner when reading the source.
* This bring the JavaScript documentation closer to the PHP documentation.

The only disadvantage is that the JSDoc parser doesn't split out the summary and the description in the new format. We've decided to solve this when building the JavaScript documentation parser.

Props herregroen.
Fixes #42901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 14:14:53 +00:00
atimmer
65b715c991 Docs: Improve JSDoc for js/media/controllers/edit-image.js.
Amends r42392  - includes the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-18 11:20:47 +00:00
atimmer
1f707de9dd Docs: Improve wp-admin JSDoc structural data globally.
JSDoc takes it structural data from `@namespace`, `@lends` and `@memberOf`. This change fixes these tags for all JavaScript files in the wp-admin folder.

* Add jsdoc configuration to parse wp-admin/js files. Use `jsdoc -c jsdoc.conf.json` to generate JSDoc.
* Define all used namespaces using `@namespace`.
* Define each usage of the extend function as a prototype assignment using `@lends`.
* Add `@alias` if JSDoc cannot detect the correct name automatically.

This has previously been corrected for all `wp-includes` JavaScript files: [41351].

Props herregroen.
Fixes #42485.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 13:42:46 +00:00
Weston Ruter
fe2fda8cc2 Editor: Fix determining TinyMCE editor width when in inline mode instead of iframe mode.
See #40854.
Amends [41985].
Props aduth.
Fixes #42416 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-13 05:17:48 +00:00
atimmer
1a357d3758 Docs: Improve JS Docs for wp-includes/js/heartbeat.js.
Most of the documentation was already present. This change achieves the following:

* Fixes the formatting for most doc blocks.
* Adds `@since` tags to all functions.
* Makes sure the heartbeat public methods are correctly added to the `wp.heartbeat` namespace.

Props andizer, jjcomack, carolinegeven.
Fixes #42675.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-12 14:33:54 +00:00
Peter Wilson
f617a2d6d9 Comments: Modernise JavaScript for comment reply links.
Update the comment reply JavaScript to be unobtrusive and use events rather than inline `onclick` attributes. 

Along with bringing the code into the 2010s this prevents an edge-case in which `addComment.moveForm()` could be called before the JavaScript has loaded.

Props peterwilsoncc, bradparbs.
Fixes #31590.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 22:37:45 +00:00
Adam Silverstein
9ff1fb5af1 Docs: Improve JSDocs for cropper.js.
Ammends r42352 - include the built media files.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-03 18:56:46 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Weston Ruter
5749295a59 Editor: Re-build tinymce.min.js after [42191].
See #42553.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-15 23:35:49 +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