Commit Graph

3373 Commits

Author SHA1 Message Date
Gary Pendergast
e69c1039eb Build Tools: Copy unminified JS files to src.
This allows `SCRIPT_DEBUG` to be set to `true` when running from `src`.

Fixes #45869.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:39:50 +00:00
desrosj
0ee1a0e4e1 Block Editor: Upgrade @WordPress packages to the latest versions.
Updated packages:

- @wordpress/annotations@1.0.5
- @wordpress/api-fetch@2.2.7
- @wordpress/block-library@2.2.12
- @wordpress/block-serialization-default-parser@2.0.3
- @wordpress/blocks@6.0.5
- @wordpress/components@7.0.5
- @wordpress/core-data@2.0.16
- @wordpress/data@4.2.0
- @wordpress/deprecated@2.0.4
- @wordpress/dom@2.0.8
- @wordpress/edit-post@3.1.7
- @wordpress/editor@9.0.7
- @wordpress/format-library@1.2.10
- @wordpress/hooks@2.0.4
- @wordpress/list-reusable-blocks@1.1.18
- @wordpress/notices@1.1.2
- @wordpress/nux@3.0.6
- @wordpress/plugins@2.0.10
- @wordpress/rich-text@3.0.4
- @wordpress/url@2.3.3
- @wordpress/viewport@2.1.0

Props: youknowriad, gziolo, desrosj.

Fixes #45814.
Built from https://develop.svn.wordpress.org/trunk@44389


git-svn-id: http://core.svn.wordpress.org/trunk@44219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 19:38:57 +00:00
desrosj
8ac2091f5d Docs: Update since tag for comment reply link improvements.
Originally added in [42360].

Fixes #31590.
Built from https://develop.svn.wordpress.org/trunk@44388


git-svn-id: http://core.svn.wordpress.org/trunk@44218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-03 19:29:51 +00:00
atimmer
a814e5d34e Build tools: Allow building WordPress to src.
After the JavaScript reorganization in [43309], it was no longer possible to test WordPress from the `src` folder. That meant a build step was required to test PHP modifications. That is suboptimal as even a simple copy is slower than a web server just serving the new file.

We achieve building to `src` by setting a `WORKING_DIR` constant in the Gruntfile that is `build` by default, but changes to `src` when the `--dev` flag is present on any Grunt command. We provide sensible defaults so some commands, such as copying `version.php`, always build to `build`.

Because testing from `build` is no longer required, we change the messages present in `index.php` and `wp-admin/index.php` to be more broadly about building WordPress.

We also change the webpack config to have more straightforward behavior based on the `buildTarget` argument. It only determines the build target now and has no implicit behavior anymore. `grunt build` still works as it worked before, to make sure that the build server produces the same `wordpress.zip` we are used to.

We do all this instead of a symlink setup because symlinks don't work on every platform.

Props omarreiss, netweb, flixos90, SergeyBiryukov.
Fixes #44492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:29:50 +00:00
desrosj
0211420001 External Libraries: zxcvbn library.
This reverts [44354] for more investigation into inconsistent password strength values that passed locally prior to commit.

Unprops omarreiss, netweb, desrosj.
See #43749.
Built from https://develop.svn.wordpress.org/trunk@44356


git-svn-id: http://core.svn.wordpress.org/trunk@44186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 21:03:49 +00:00
desrosj
7e99487473 External Libraries: Update zxcvbn to 4.2.2.
Version 4.2.2 of the zxcvbn password strength library has several bug fixes. A full list of changes can be seen here: https://github.com/dropbox/zxcvbn/compare/v4.4.1...v4.4.2.

This commit also adds the library as a project dependency, making it easier to update in the future. Because the dictionary within the library contains non-PG language, a `rot13:zxcvbn` task has been added to Grunt to perform a ROT-13 cipher on the library. This task has been added to `grunt build` and `grunt build:js`.

Props omarreiss, netweb, desrosj.
Fixes #43749.
Built from https://develop.svn.wordpress.org/trunk@44354


git-svn-id: http://core.svn.wordpress.org/trunk@44184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-20 19:46:50 +00:00
Sergey Biryukov
413050b191 Block Editor: Upgrade @WordPress packages to the latest version (4.7.1)
Updated packages:

 - @wordpress/block-library@2.2.11
 - @wordpress/edit-post@3.1.6
 - @wordpress/editor@9.0.6
 - @wordpress/format-library@1.2.9

Props youknowriad, pento.
Merges [44287] to trunk.
Fixes #45637.
Built from https://develop.svn.wordpress.org/trunk@44319


git-svn-id: http://core.svn.wordpress.org/trunk@44149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:35:38 +00:00
desrosj
d6e8d93412 Block Editor: Upgrade @wordpress packages to match version 4.7.1.
Updated packages:

- `@wordpress/annotations
- `@wordpress/api-fetch
- `@wordpress/block-library@2.2.10
- `@wordpress/block-serialization-default-parser@2.0.2`
- `@wordpress/block-serialization-spec-parser@2.0.2`
- `@wordpress/blocks@6.0.4`
- `@wordpress/components@7.0.4`
- `@wordpress/core-data@2.0.15`
- `@wordpress/data@4.1.0`
- `@wordpress/date@3.0.1`
- `@wordpress/edit-post@3.1.5`
- `@wordpress/editor@9.0.5`
- `@wordpress/eslint-plugin@1.0.0`
- `@wordpress/format-library@1.2.8`
- `@wordpress/html-entities@2.0.4`
- `@wordpress/list-reusable-blocks@1.1.17`
- `@wordpress/notices@1.1.1`
- `@wordpress/nux@3.0.5`
- `@wordpress/rich-text@3.0.3`
- `@wordpress/url@2.3.2`
- `@wordpress/viewport@2.0.13`

This also includes the updates the Core blocks.

The script loader is updated to match the Gutenberg repository as well.

Props atimmer, gziolo, joen, youknowriad.

Merges [44183] to trunk.

Fixes #45442, #45637.
Built from https://develop.svn.wordpress.org/trunk@44296


git-svn-id: http://core.svn.wordpress.org/trunk@44126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:16:48 +00:00
Sergey Biryukov
8f4440eb10 Build Tools: Don't include .map files in the build.
These files are fairly large, and while they're useful in development, they're not needed in the final build.

Props pento, mcsf.
Merges [43931] and [43932] to trunk.
See #45201.
Built from https://develop.svn.wordpress.org/trunk@44282


git-svn-id: http://core.svn.wordpress.org/trunk@44112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 03:14:52 +00:00
desrosj
077e2c5fcf Block Editor: Update @wordpress package dependencies.
Updates the following packages:

block-library, block-serialization-default-parser, block-serialization-spec-parser, blocks, edit-post, editor, format-library.

Merges [43955] to trunk.

Props youknowriad.

Fixes #45145.
Built from https://develop.svn.wordpress.org/trunk@44281


git-svn-id: http://core.svn.wordpress.org/trunk@44111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 21:59:54 +00:00
desrosj
03262a191f Block Editor: Refresh nonces used by wp.apiFetch.
Adds heartbeat nonces refreshing support to `wp.apiFetch` requests.

Props pento, adamsilverstein, dd32, desrosj, youknowriad.

Merges [43939] into trunk.

Fixes #45113. 
Built from https://develop.svn.wordpress.org/trunk@44275


git-svn-id: http://core.svn.wordpress.org/trunk@44105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:28:51 +00:00
desrosj
36158d7909 Block Editor: Update @wordpress package dependencies.
Update packages include:

- block-library
- components
- edit-post
- editor
- format-library
- list-reusable-blocks
- nux

Other changes:

- Fix a translator comment in `edit-form-blocks.php`.
- Rename the `gutenberg_` functions in `blocks/latest-comments.php`.

Props noisy socks, youknowriad, pinto, swissspidy.

Merges [43935] and [43949-43951] into trunk.

See #45145.
Built from https://develop.svn.wordpress.org/trunk@44273


git-svn-id: http://core.svn.wordpress.org/trunk@44103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:06:59 +00:00
desrosj
4f86a03258 Block Editor: Update @wordpress dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.

Merges [43891], [43903], and [43919] to trunk.

Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262


git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 15:37:00 +00:00
desrosj
9d7aa3436e Block Editor: Update @wordpress dependencies.
Changes of note:

- Includes the new Annotations API package.
- `wp-polyfill-ecmascript.js` is renamed to `wp-polyfill.js`.
- `strip_dynamic_blocks()` has been removed in favor of `excerpt_remove_blocks()`.
- The PHP block parser is now syncing from the `block-serialization-default-parser` package.
- `do_blocks()` uses the new parser.
- The `do_block` filter has been removed from `do_blocks()`, in favor of a `render_block` filter in `render_block()`.

Also, a little cleanup to `render_block()`. Always normalize `$block['attrs’]` to array in `’render_block’` filter.
Props pento, azaozz.

Merges [43884] and [43888] to trunk.

See #45145, #45190, #45264, #45282.
Built from https://develop.svn.wordpress.org/trunk@44261


git-svn-id: http://core.svn.wordpress.org/trunk@44091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 04:52:00 +00:00
Sergey Biryukov
6ffafa5bc7 TinyMCE: Fix the keyboard shortcut (Alt+Shift+H) to not open the default Block Editor help modal and change the title of the help modal to "Classic Block Keyboard Shortcuts" in the Classic BLock. Also remove Alt+Shift+Z in the Classic Block as it conflicts with the Block Editor.
Props azaozz.
Merges [43915] to trunk.
Fixes #45365.
Built from https://develop.svn.wordpress.org/trunk@44257


git-svn-id: http://core.svn.wordpress.org/trunk@44087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:32:21 +00:00
Sergey Biryukov
e8cbdf9405 Block Editor: Fix the TinyMCE wordpress plugin to handle hiding/showing of toolbars in the classic block. Change the classic block toolbar to use the (now fixed) wp_adv button.
Props azaozz.
Merges [43889] and [43890] to trunk.
Fixes #45264.
Built from https://develop.svn.wordpress.org/trunk@44247


git-svn-id: http://core.svn.wordpress.org/trunk@44077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:23:55 +00:00
Jeremy Felt
b93dd61e90 Blocks: Add "Export as JSON" action to the wp_block post list screen.
Remove the "Quick Edit" for `wp_block`s, too, as they don't need any of that functionality.

Merges [43854] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45247.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:01:05 +00:00
atimmer
7616bf91af FTP/PemFTP Library: Fix some PHP notices.
ftp_base::glob() used each(), which is deprecated as of PHP 7.2.
ftp_base::fget() was missing the decleration of its third parameter, $rest.

Props itowhid06, pento.
Merges [43848] to trunk.
Fixes #44489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-15 11:00:40 +00:00
atimmer
96b2a4677c Build Tools: Update the @wordpress packages.
Trunk now matches Gutenberg 4.2 RC1.

Props pento.
Merges [43847] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:20:00 +00:00
atimmer
e055e026e3 l10n: Avoid calling is_user_logged_in() in determine_locale().
is_user_logged_in() is a pluggable function, and loaded after plugins are loaded. If a plugin calls __() too early, is_user_logged_in() is missing and WordPress will fatal. get_user_locale() already handles this scenario for us, so it's safe to rely on exclusively.

Props danielbachhuber.
Merges [43846] to trunk.
See #44758.
Fixes #45235.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:15:54 +00:00
atimmer
86ccb815e7 Build Tools: Update @wordpress packages.
Props pento.
Merges [43843] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 12:07:58 +00:00
atimmer
cc13a1f3a0 General: Fix code formatting issues.
Fix code formatting after [44174] and [44177].

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


git-svn-id: http://core.svn.wordpress.org/trunk@44008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 11:02:53 +00:00
atimmer
a603510b73 Build Tools: Upgrade @wordpress packages to the latest version.
This also includes the new @wordpress/format-library and @wordpress/notices packages.

package-lock.json has been completely regenerated in this commit.

Props pento.
Merges [43840] to trunk.
See #45145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 10:55:01 +00:00
Gary Pendergast
47b6c4e0d7 Scripts: Revert some functions being incorrectly removed in [44163].
Built from https://develop.svn.wordpress.org/trunk@44164


git-svn-id: http://core.svn.wordpress.org/trunk@43994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:53:54 +00:00
Gary Pendergast
bffe848347 Build Tools: Update the @wordpress/* packages.
Merges [43801,43803] from the 5.0 branch to trunk.

See #45145.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:44:01 +00:00
desrosj
ca80466039 Scripts: Add a missing date format to the wp-date config.
`wp-date` recently added the `datetimeAbbreviated` format, but the config wasn't sending it on page load.

Props pento.

Merges [43818] to trunk.

Fixes #45158.
Built from https://develop.svn.wordpress.org/trunk@44162


git-svn-id: http://core.svn.wordpress.org/trunk@43992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:41:57 +00:00
Gary Pendergast
e4b570f8fb 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.

Merges [43760] from the 5.0 branch to trunk.

Props atimmer, pento.
Fixes #45119.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 04:11:47 +00:00
desrosj
5db34748e6 Script loader: Adjust JS packages registration.
Adjusts the packages registration after [43723]:

    Combine the different registration functions into one `wp_default_packages` function. To reach this goal move the prefix logic into a function so it can be called from different locations. Use a static variable there to prevent duplicate inclusion of `version.php`.

    Call this function from the `wp_default_scripts` action by registering it as a default filter.

    Combine some of the logic in `_WP_Editors::print_tinymce_scripts` into `wp_register_tinymce_scripts`. The logic to force an uncompressed TinyMCE script file stays in `_WP_Editors::force_uncompressed_tinymce` because that logic is very specific to the classic editor.

    The script handle `wp-tinymce` is now a dependency of the editor script handle. In combination with the previous item, this makes the classic editor work.

    Adjust the syntax of the script paths to be more consistent with other WordPress code.

    Always use "production" mode for the media files to prevent people from inadvertently committing development files.

Props pento, omarreiss, atimmer.

Merges [43738] into trunk.

Fixes #45065.
Built from https://develop.svn.wordpress.org/trunk@44115


git-svn-id: http://core.svn.wordpress.org/trunk@43945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:27:38 +00:00
atimmer
4f9ba9044e 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.

Merge notes: In `trunk` uglify isn't run on the media files after webpack, so webpack does need to do that. Newer webpack versions use `terser-webpack-plugin` as the default minification. Use the `uglifyjs-webpack-plugin` plugin to maintain the same behavior as before. We can look into terser as a minifier later.

Merges [43688] to trunk.
See #45065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 11:05:25 +00:00
atimmer
0a372b57d0 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].

Merge notes: trunk already had an identical .nvmrc. package-lock.json exists in trunk, but has some changes based on the dependency updates.

Props jorbin.
Merges [43684], [43685] and [43686] to trunk.
See #44600.
Fixes #45064.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-11 16:13:26 +00:00
Sergey Biryukov
e1b0d4ed7a Embeds: After [43593], move the new check to a separate line to avoid test_js_no_ampersands_in_compiled failure caused by UglifyJS task.
See #44832.
Built from https://develop.svn.wordpress.org/trunk@43597


git-svn-id: http://core.svn.wordpress.org/trunk@43426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-30 12:40:26 +00:00
Sergey Biryukov
07e2fba981 Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.
Props dsifford, kadamwhite.
Fixes #44832.
Built from https://develop.svn.wordpress.org/trunk@43593


git-svn-id: http://core.svn.wordpress.org/trunk@43422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-30 10:30:24 +00:00
John Blackbourn
47d32decd6 Docs: Correct and improve various inline documentation.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@43411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-27 14:28:26 +00:00
Andrew Ozz
5bbb3b38d9 TinyMCE: remove stray CSS map reference from skin.min.css.
Props: pross.
Fixes #44785.
Built from https://develop.svn.wordpress.org/trunk@43581


git-svn-id: http://core.svn.wordpress.org/trunk@43410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 15:09:24 +00:00
Andrew Ozz
1824884b75 Reorder quicktags.js a bit to account for the order of defining vars and functions after [43577].
See #44371.
Built from https://develop.svn.wordpress.org/trunk@43579


git-svn-id: http://core.svn.wordpress.org/trunk@43408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-20 13:34:25 +00:00
omarreiss
bdbaccce37 General: Explicitly assigns all JS globals to the window.
Many variables in the JavaScript were defined in the global scope without being explicitly assigned to the window. When built with Webpack, the code gets encapsulated in anonymous functions and those implicit globals get assigned to the wrong scope. This patch prevents that from happening.

Fixes #44371. See #43731.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 13:33:24 +00:00
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
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