summaryrefslogtreecommitdiffstatshomepage
path: root/src/wp-includes/js
Commit message (Collapse)AuthorAge
* Once upon a midnight dreary, while I coded, weak and weary,Gary Pendergast2018-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@43309 602fd350-edb4-49c9-b593-d223f7449a82
* Privacy: change how the default text for privacy policy is added:Andrew Ozz2018-05-03
| | | | | | | | | | - 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. git-svn-id: https://develop.svn.wordpress.org/trunk@43146 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `wp-includes.js/wpdialog.js`.Anton Timmermans2018-05-03
| | | | | | | | Props igorsch, LisanneKluitmans, manuelaugustin. Fixes #43947. git-svn-id: https://develop.svn.wordpress.org/trunk@43144 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `js/wp-emoji-loader.js`.Anton Timmermans2018-05-03
| | | | | | | | Props nicollle, dfangstrom, Igorsch. Fixes #43870. git-svn-id: https://develop.svn.wordpress.org/trunk@43143 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `media/controllers/gallery-edit.js`.Anton Timmermans2018-05-03
| | | | | | | | | Amends [43141] - includes the built media files. See #43866. git-svn-id: https://develop.svn.wordpress.org/trunk@43142 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `media/controllers/gallery-edit.js`.Anton Timmermans2018-05-03
| | | | | | | | Props Xyfi, nataliashitova, igorsch, ireneyoast, manuelaugustin. Fixes #43866. git-svn-id: https://develop.svn.wordpress.org/trunk@43141 602fd350-edb4-49c9-b593-d223f7449a82
* Privacy: add "Mine" filter for media similarly to posts and comments.Andrew Ozz2018-05-01
| | | | | | | Props audrasjb. See #43820. git-svn-id: https://develop.svn.wordpress.org/trunk@43056 602fd350-edb4-49c9-b593-d223f7449a82
* Privacy: add default text for a privacy policy. First run.Andrew Ozz2018-04-30
| | | | | | | Props xkon, idea15, allendav, azaozz. See #43473. git-svn-id: https://develop.svn.wordpress.org/trunk@43044 602fd350-edb4-49c9-b593-d223f7449a82
* TinyMCE: Update to 4.7.11Ella Van Dorpe2018-04-25
| | | | git-svn-id: https://develop.svn.wordpress.org/trunk@43004 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `wp-includes/js/wp-backbone.js`.Anton Timmermans2018-04-22
| | | | | | | | | | Changes some additional docs after [42993]. Props birgire, adamsilverstein, netweb. Fixes #35465. git-svn-id: https://develop.svn.wordpress.org/trunk@42996 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `wp-includes/js/wp-backbone.js`.Anton Timmermans2018-04-19
| | | | | | | | Props ericlewis, gma992, adamsilverstein. Fixes #35465. git-svn-id: https://develop.svn.wordpress.org/trunk@42993 602fd350-edb4-49c9-b593-d223f7449a82
* REST API: Handle api-request query parameters with plain permalinks.Adam Silverstein2018-04-09
| | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42965 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Update built files after [42798].Dominik Schilling (ocean90)2018-04-03
| | | | | | See #43500. git-svn-id: https://develop.svn.wordpress.org/trunk@42931 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Update minified version of imgAreaSelect after [42874].Dominik Schilling (ocean90)2018-04-03
| | | | | | | | | Adds imgAreaSelect to the uglify grunt process. Props adamsilverstein. Fixes #41242. git-svn-id: https://develop.svn.wordpress.org/trunk@42930 602fd350-edb4-49c9-b593-d223f7449a82
* REST API JavaScript Client: Support an empty string for `nonce` to disable ↵Dominik Schilling (ocean90)2018-03-18
| | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42852 602fd350-edb4-49c9-b593-d223f7449a82
* REST API JS Client: Extend custom nonce functionality to collections.Dominik Schilling (ocean90)2018-03-18
| | | | | | | | | This brings the improved nonce handling from [41553] to collections to remove the direct `wpApiSettings.nonce` dependency. Props adamsilverstein, ocean90, swissspidy. Fixes #43265. git-svn-id: https://develop.svn.wordpress.org/trunk@42851 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Fix image cropping on touch screen devices.Adam Silverstein2018-03-09
| | | | | | | | | | | * 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42818 602fd350-edb4-49c9-b593-d223f7449a82
* Accessibility: Insert Link modal: Improve keyboard interaction.Andrea Fercia2018-03-08
| | | | | | | | | | Avoids to change the selected link when using the Shift and Up/Down arrow keys to select text in the form fields. Fixes #43253. git-svn-id: https://develop.svn.wordpress.org/trunk@42807 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `wp-includes/js/media/controllers/gallery-add.js`.Sergey Biryukov2018-03-08
| | | | | | | Props boblinthorst, bramheijmink, manuelaugustin, ireneyoast, igorsch, nataliashitova. Fixes #43500. git-svn-id: https://develop.svn.wordpress.org/trunk@42798 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Fix typo in `wp.customize.selectiveRefresh.placements()` description.Sergey Biryukov2018-02-26
| | | | | | | Props Nikschavan. Fixes #43418. git-svn-id: https://develop.svn.wordpress.org/trunk@42754 602fd350-edb4-49c9-b593-d223f7449a82
* Fix eshint error since r42739.Adam Silverstein2018-02-25
| | | | | | | | Remove a trailing comma in [42739] that was throing a jshint error. git-svn-id: https://develop.svn.wordpress.org/trunk@42740 602fd350-edb4-49c9-b593-d223f7449a82
* Media: grid view - correct placeholder positioning during uploads.Adam Silverstein2018-02-25
| | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42739 602fd350-edb4-49c9-b593-d223f7449a82
* General: Further improve error messages following [42648].Peter Wilson2018-02-19
| | | | | | | | | Props kristastevens, melchoyce. Fixes #38332 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42719 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `media/views/spinner.js`.Anton Timmermans2018-02-13
| | | | | | | Amends r42675 - includes the built media files. git-svn-id: https://develop.svn.wordpress.org/trunk@42709 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `media/views/spinner.js`.Anton Timmermans2018-02-09
| | | | | | | | Props avillegasn. Fixes #43230. git-svn-id: https://develop.svn.wordpress.org/trunk@42675 602fd350-edb4-49c9-b593-d223f7449a82
* General: Replace `Cheatin’ uh?` with friendlier error messages.Peter Wilson2018-02-05
| | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42648 602fd350-edb4-49c9-b593-d223f7449a82
* Administration: CSS coding standards: use double quotes for values that ↵Andrea Fercia2018-02-03
| | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42641 602fd350-edb4-49c9-b593-d223f7449a82
* Media: avoid page scrolling when opening the media modal.Andrea Fercia2018-01-31
| | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42624 602fd350-edb4-49c9-b593-d223f7449a82
* Customize: Ensure media playlists get initialized after selective refresh; ↵Weston Ruter2018-01-29
| | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42613 602fd350-edb4-49c9-b593-d223f7449a82
* Emoji: Update Emoji browser support tests for Twemoji v2.4.0Peter Wilson2018-01-24
| | | | | | | | | Really, following [42598]. Fixes #42862 for trunk, really. git-svn-id: https://develop.svn.wordpress.org/trunk@42602 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Fix JSHint error after [42595].Sergey Biryukov2018-01-24
| | | | | | See #42646. git-svn-id: https://develop.svn.wordpress.org/trunk@42599 602fd350-edb4-49c9-b593-d223f7449a82
* Emoji: Update Emoji browser support tests for Twemoji v2.4.0Peter Wilson2018-01-24
| | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42598 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Store and reuse image cropper ratio settings if available, instead of ↵Sergey Biryukov2018-01-24
| | | | | | | | | overwriting. Props adamsilverstein. Fixes #42646. git-svn-id: https://develop.svn.wordpress.org/trunk@42595 602fd350-edb4-49c9-b593-d223f7449a82
* Media: Introduce a custom error handler for MediaElement.js to display a ↵Sergey Biryukov2018-01-24
| | | | | | | | | download link if a FLV file cannot be rendered for any reason. Props Clorith. Fixes #42643. git-svn-id: https://develop.svn.wordpress.org/trunk@42582 602fd350-edb4-49c9-b593-d223f7449a82
* TinyMCE: backport bug fixes to `NotificationManager` and `WindowManager` ↵Andrew Ozz2018-01-23
| | | | | | | | | from https://github.com/tinymce/tinymce/commit/d1877933fa1e98430e5e9e1f78884be60766d2f0#diff-2e5c98d81ce2481aa1042b2320728b65 and to `MultiRange` from https://github.com/tinymce/tinymce/commit/250675bb7bae2e6ef5cef715ef57cdf5ab6bff8a. Props peterwilsoncc, azaozz. Fixes #42722 for trunk, see #43012. git-svn-id: https://develop.svn.wordpress.org/trunk@42576 602fd350-edb4-49c9-b593-d223f7449a82
* Emoji: Update Twemoji to 2.4.0.Sergey Biryukov2018-01-23
| | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42566 602fd350-edb4-49c9-b593-d223f7449a82
* Remove JSHint due to license compatibilityAaron Jorbin2018-01-23
| | | | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42547 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Use explicit context instead of a trailing space for `Edit` string ↵Sergey Biryukov2018-01-17
| | | | | | | | | in TinyMCE plugins. Props scottlee, ayubadiputra, NathanAtmoz. Fixes #42543. git-svn-id: https://develop.svn.wordpress.org/trunk@42523 602fd350-edb4-49c9-b593-d223f7449a82
* External Libraries: Remove unnecessary / obsoleted MediaElement.js files.Dion Hulse2018-01-16
| | | | | | | | Props joemcgill. Fixes #42720 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42462 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JS Docs for `controllers/customize-image-cropper.js`.Anton Timmermans2018-01-11
| | | | | | | | Props manuelaugustin, bramheijmink, andizer, ireneyoast. Fixes #43020. git-svn-id: https://develop.svn.wordpress.org/trunk@42435 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Link suggestions: add fallback title for posts with no title.Andrea Fercia2018-01-02
| | | | | | | Fixes #42664. git-svn-id: https://develop.svn.wordpress.org/trunk@42425 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `customize-preview-widgets.js`.Anton Timmermans2017-12-21
| | | | | | | | Props ireneyoast, andizer, robinvandervliet, boblinthorst. Fixes #42954. git-svn-id: https://develop.svn.wordpress.org/trunk@42416 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `media/views/attachments.js`.Anton Timmermans2017-12-21
| | | | | | | | Props maartenleenders, herregroen, jipmoors, ireneyoast. Fixes #42832. git-svn-id: https://develop.svn.wordpress.org/trunk@42415 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Remove `@summary` tags from JSDoc.Anton Timmermans2017-12-18
| | | | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42411 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JSDoc for `js/media/controllers/edit-image.js`.Anton Timmermans2017-12-18
| | | | | | | Amends r42392 - includes the built media files. git-svn-id: https://develop.svn.wordpress.org/trunk@42410 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve wp-admin JSDoc structural data globally.Anton Timmermans2017-12-15
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42403 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JS Docs for `js/media/controllers/edit-image.js`.Anton Timmermans2017-12-13
| | | | | | | | Props jjcomack, nicollle, andizer. Fixes #42680. git-svn-id: https://develop.svn.wordpress.org/trunk@42392 602fd350-edb4-49c9-b593-d223f7449a82
* Editor: Fix determining TinyMCE editor width when in inline mode instead of ↵Weston Ruter2017-12-13
| | | | | | | | | | | | iframe mode. See #40854. Amends [41985]. Props aduth. Fixes #42416 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@42390 602fd350-edb4-49c9-b593-d223f7449a82
* Docs: Improve JS Docs for `wp-includes/js/heartbeat.js`.Anton Timmermans2017-12-12
| | | | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42389 602fd350-edb4-49c9-b593-d223f7449a82
* Comments: Modernise JavaScript for comment reply links.Peter Wilson2017-12-03
| | | | | | | | | | | | 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. git-svn-id: https://develop.svn.wordpress.org/trunk@42360 602fd350-edb4-49c9-b593-d223f7449a82