Commit Graph

3287 Commits

Author SHA1 Message Date
K. Adam White
b5ec1e6d96 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.
Fixes #44764.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-11 18:51:24 +00:00
Konstantin Obenland
071984839c Toolbar: Check if obj is set before using it.
Props pento.
See #44526.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-06 19:33:28 +00:00
Konstantin Obenland
51f09ffc2a Toolbar: Fail gracefully when adding events to non-existent elements
Avoids a type error when `obj` is not set.

Fixes #44526.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 22:00:25 +00:00
Andrew Ozz
26ca877782 TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
Fixes #44134.
Built from https://develop.svn.wordpress.org/trunk@43447


git-svn-id: http://core.svn.wordpress.org/trunk@43274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-16 08:07:26 +00:00
Gary Pendergast
0db068da94 Emoji: Update Twemoji to version 11.0.
{U+01F9B9}

Props kraftbj,
Fixes #44339.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:42:55 +00:00
atimmer
96bfb67e79 Docs: Improve JSDoc for emoji.js.
Props lisannekluitmans, hansjovisyoast, igorsch, nicollle.
Fixes #44367.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:35:44 +00:00
atimmer
d9df5dec11 Docs: Improve JSDoc for auth-check.js.
Props pskli.
Fixes #44364.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:33:38 +00:00
atimmer
bde558be2f Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:15 +00:00
atimmer
6a9a5e123c Docs: Improve JSDoc for pointer.js.
Props maartenleenders, dfangstrom.
Fixes #44325.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:29:48 +00:00
atimmer
ba9e0ac030 Docs: Improve JSDoc for admin-bar.js.
Change an incorrect type and description after [43332].

Props afercia.
See #43871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:27:38 +00:00
Andrew Ozz
62bb0dcafd TinyMCE: prevent creation of paragraphs from multiple HTML comments when wpautop is disabled.
Fixes #44308.
Built from https://develop.svn.wordpress.org/trunk@43336


git-svn-id: http://core.svn.wordpress.org/trunk@43164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:25:32 +00:00
atimmer
7c410b8d37 Docs: Improve JSDoc for zxcvbn-async.js.
Props manuelaugustin, igorsch, LisanneKluitmans.
Fixes 43948.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:24:18 +00:00
atimmer
e6c02f874c Docs: Improve JSDoc for admin-bar.js.
Props manuelaugustin, terwdan, sjardo, LisanneKluitmans.
Fixes #43871.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:23:53 +00:00
Gary Pendergast
922f83a69f Once upon a midnight dreary, while I coded, weak and weary,
In many a strange and curious file of forgotten lore—
While I pondered, blaming Nacin, my notifications suddenly awakened,
As of someone quietly DMing;—DMing me, I can’t ignore.
“’Tis some contributor,” I muttered, “DMing me an idea or four—
            Only this and nothing more.”

Ah, distinctly I remember, at WordCamp US, last December;
A mad proposal nearly laid me—down out cold—upon the floor.
Curious, I listened closely;—to a plan I agreed with, mostly—
A way to make our JavaScript—JavaScript which was a chore—
Maintainable, extendable, for the future, is what I saw.
            Guten-ready for evermore.

Open here I switch to Slack, when, with many a patch and hack,
In there stepped Omar, a JavaScript developer hardcore;
Pronouncing all the changes fit; ready now to be commit;
“There’s nothing else for us to do,” DMing me, “It’s done!” he swore—
“No longer random guessing at which file need next be explored—
            Let’s move on, we’re all aboard.”

Moved all together, grouped and managed, in folders all is packaged,
The code had all been cleaned and tidied, important parts moved to the fore,
“Though this change be useful here,” I said, “it is too large, I fear,
We couldn’t manage such a patch, we’ve done nothing like this before—
Tell me where doth go this change, change to make our codebase soar!”
            Quoth Omar, “In WordPress Core.”

Props omarreis for shepherding this significant change.
Props adamsilverstein, aduth, atimmer, dingo_bastard, frank-klein, gziolo, herregroen, jaswrks, jeremyfelt, jipmoors, jorbin, netweb, ocean90, pento, tjnowell, and youknowriad for testing, feedback, discussion, encouragement, commiserations, etc.
I make no apologies for this commit message.
Fixes #43055.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-23 10:05:31 +00:00
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