Commit Graph

2086 Commits

Author SHA1 Message Date
Sergey Biryukov
47720de1c2 Text Changes: Use consistent question wording for discarding unpublished changes in Customizer.
Props ramiy.
Fixes #47258.
Built from https://develop.svn.wordpress.org/trunk@45434


git-svn-id: http://core.svn.wordpress.org/trunk@45245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 15:19:50 +00:00
Andrew Ozz
80aee4ae87 jQuery: bring jquery.js back into the WordPress SVN repo and backport the patch from 3.4.0.
Props MikeNGarrett, peterwilsoncc, azaozz.
Fixes #47020 for trunk.
Built from https://develop.svn.wordpress.org/trunk@45342


git-svn-id: http://core.svn.wordpress.org/trunk@45153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 04:25:54 +00:00
aduth
3c44f9e15a Block Editor: Upgrade WordPress packages to the latest versions.
Updated packages:

 - @wordpress/annotations@1.2.3
 - @wordpress/block-editor@2.0.2
 - @wordpress/block-library@2.4.5
 - @wordpress/blocks@6.2.5
 - @wordpress/components@7.3.2
 - @wordpress/dom@2.2.5
 - @wordpress/e2e-tests@1.1.5
 - @wordpress/edit-post@3.3.5
 - @wordpress/editor@9.2.5
 - @wordpress/format-library@1.4.5
 - @wordpress/list-reusable-blocks@1.3.5
 - @wordpress/nux@3.2.5
 - @wordpress/rich-text@3.2.3

Props: youknowriad, gwwar, iseulde, tfrommen, gziolo.

Fixes #47284.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-16 18:08:00 +00:00
aduth
0feb55f633 Editor: Update packages to apply bugfixes from Gutenberg 5.5.
- @wordpress/block-editor@2.0.1
- @wordpress/block-library@2.4.4
- @wordpress/blocks@6.2.4
- @wordpress/components@7.3.1
- @wordpress/dom@2.2.4
- @wordpress/e2e-tests@1.1.4
- @wordpress/edit-post@3.3.4
- @wordpress/editor@9.2.4
- @wordpress/format-library@1.4.4
- @wordpress/list-reusable-blocks@1.3.4
- @wordpress/nux@3.2.4

Props iseulde, kjellr, aduth, get_dave, talldanwp, jorgefilipecosta, afercia, nosolosw, jasmussen, netweb .

See https://github.com/WordPress/gutenberg/pull/14987 .
See https://github.com/WordPress/gutenberg/pull/15020 .
Fixes #46951 .

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


git-svn-id: http://core.svn.wordpress.org/trunk@45064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-22 12:40:04 +00:00
Dominik Schilling
bfc2be39e6 Site Health: Enable JavaScript translations for the site-health script.
See #46683.
Built from https://develop.svn.wordpress.org/trunk@45244


git-svn-id: http://core.svn.wordpress.org/trunk@45053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-18 15:41:51 +00:00
Sergey Biryukov
d2ccaacedf Docs: Correct spelling in various comments and DocBlocks, per the conventions in Core Contributor Handbook.
Props man4toman, samanehmirrajabi.
Fixes #45857.
Built from https://develop.svn.wordpress.org/trunk@45232


git-svn-id: http://core.svn.wordpress.org/trunk@45041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-17 13:26:51 +00:00
Sergey Biryukov
1ae11820fc Site Health: i18n audit, take 2.
* Use `wp.i18n` to translate JavaScript strings.
* Use `_n()` for proper plural forms support.

Props TimothyBlynJacobs, ocean90, afercia.
Fixes #46683.
Built from https://develop.svn.wordpress.org/trunk@45178


git-svn-id: http://core.svn.wordpress.org/trunk@44987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 20:34:51 +00:00
desrosj
21da589622 Site Health: Ensure Site Health pages are correctly displayed for RTL locales.
Props: ebrahimzadeh, afercia, mohadeseghasemi.
Fixes #46868.
Built from https://develop.svn.wordpress.org/trunk@45168


git-svn-id: http://core.svn.wordpress.org/trunk@44977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 16:39:52 +00:00
Gary Pendergast
95df8fa792 Block Editor: Update packages to bring a selection of bugfixes in.
Props iseulde, kjellr, aduth, 0mirka00, mcsf, nosolosw, gziolo, jasmussen, talldanwp, notnownikki, swissspidy, jorgefilipecosta, noisysocks.
See https://github.com/WordPress/gutenberg/pull/14796.
Fixes #46801.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 06:37:57 +00:00
Gary Pendergast
65f7cdbce0 Site Health: Improve the "Copy to clipboard" button.
The previous method for copying the debug report to the clipboard involved having a hidden `<textarea>`, but this shows up in screen readers and can't be reliably hidden.

To work around this, the button now uses the `clipboard.js` library, which automatically handles browser differences in the Clipboard API, and can load the text to copy from a `data-` attribute on the button.

Props pento, hedgefield, afercia.
Fixes #46647.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 22:31:52 +00:00
Gary Pendergast
0a9d61ab63 Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 03:55:53 +00:00
Ella Iseulde Van Dorpe
2aa1b8ff48 Block Editor: Update the WordPress Packages from Gutenberg 5.3
- @wordpress/a11y@2.2.0
 - @wordpress/annotations@1.2.0
 - @wordpress/api-fetch@3.1.0
 - @wordpress/autop@2.2.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0
 - @wordpress/babel-preset-default@4.1.0
 - @wordpress/blob@2.3.0
 - @wordpress/block-editor@1.1.0
 - @wordpress/block-library@2.4.0
 - @wordpress/block-serialization-default-parser@3.1.0
 - @wordpress/blocks@6.2.0
 - @wordpress/components@7.2.0
 - @wordpress/compose@3.2.0
 - @wordpress/core-data@2.2.0
 - @wordpress/data@4.4.0
 - @wordpress/date@3.2.0
 - @wordpress/deprecated@2.2.0
 - @wordpress/docgen@1.1.0
 - @wordpress/dom-ready@2.2.0
 - @wordpress/dom@2.2.0
 - @wordpress/e2e-test-utils@1.1.0
 - @wordpress/e2e-tests@1.1.0
 - @wordpress/edit-post@3.3.0
 - @wordpress/edit-widgets@0.2.0
 - @wordpress/editor@9.2.0
 - @wordpress/element@2.3.0
 - @wordpress/escape-html@1.2.0
 - @wordpress/eslint-plugin@2.1.0
 - @wordpress/format-library@1.4.0
 - @wordpress/hooks@2.2.0
 - @wordpress/html-entities@2.2.0
 - @wordpress/i18n@3.3.0
 - @wordpress/keycodes@2.2.0
 - @wordpress/list-reusable-blocks@1.3.0
 - @wordpress/notices@1.3.0
 - @wordpress/nux@3.2.0
 - @wordpress/plugins@2.2.0
 - @wordpress/priority-queue@1.1.0
 - @wordpress/redux-routine@3.2.0
 - @wordpress/rich-text@3.2.0
 - @wordpress/scripts@3.1.0
 - @wordpress/shortcode@2.2.0
 - @wordpress/url@2.5.0
 - @wordpress/viewport@2.3.0
 - @wordpress/wordcount@2.2.0


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


git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:48:00 +00:00
aduth
9cf4ee65a7 Scripts: Assign api-fetch nonce with corrected rest_nonce.
As of `@wordpress/api-fetch@3.0.0` (introduced in 44812), the `apiFetch` nonce middleware must have its nonce value assigned explicitly, and will no longer listen for heartbeat ticks automatically. This changeset adds an inline script for the default registration of the `api-fetch` script handle to assign the nonce value in response to the heartbeat action. In doing so, it removes the now-unused, misnamed `rest-nonce` property from the heartbeat response, whose original introduction served as temporary compatibility with earlier versions of `@wordpress/api-fetch`.

See https://github.com/WordPress/gutenberg/pull/13451
See #45113

Props adamsilverstein, nerrad .
Fixes #46107 .

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


git-svn-id: http://core.svn.wordpress.org/trunk@44780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:53:50 +00:00
youknowriad
c32464d7f1 Block Editor: Fix unit tests after new blocks addition.
- Regenerate the REST API fixtures.
 - Remove the block registration hooks in the unit tests.

Refs #46429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 11:54:51 +00:00
youknowriad
2d58d57e38 Block Editor: Update the WordPress Packages from Gutenberg 5.2.
Updated Packages:

 - @wordpress/a11y@2.1.0
 - @wordpress/annotations@1.1.0
 - @wordpress/api-fetch@3.0.0
 - @wordpress/autop@2.1.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0
 - @wordpress/babel-plugin-makepot@3.0.0
 - @wordpress/babel-preset-default@4.0.0
 - @wordpress/blob@2.2.0
 - @wordpress/block-editor@1.0.0
 - @wordpress/block-library@2.3.0
 - @wordpress/block-serialization-default-parser@3.0.0
 - @wordpress/block-serialization-spec-parser@3.0.0
 - @wordpress/blocks@6.1.0
 - @wordpress/browserslist-config@2.3.0
 - @wordpress/components@7.1.0
 - @wordpress/compose@3.1.0
 - @wordpress/core-data@2.1.0
 - @wordpress/custom-templated-path-webpack-plugin@1.2.0
 - @wordpress/data@4.3.0
 - @wordpress/date@3.1.0
 - @wordpress/deprecated@2.1.0
 - @wordpress/docgen@1.0.0
 - @wordpress/dom-ready@2.1.0
 - @wordpress/dom@2.1.0
 - @wordpress/e2e-test-utils@1.0.0
 - @wordpress/e2e-tests@1.0.0
 - @wordpress/edit-post@3.2.0
 - @wordpress/editor@9.1.0
 - @wordpress/element@2.2.0
 - @wordpress/escape-html@1.1.0
 - @wordpress/eslint-plugin@2.0.0
 - @wordpress/format-library@1.3.0
 - @wordpress/hooks@2.1.0
 - @wordpress/html-entities@2.1.0
 - @wordpress/i18n@3.2.0
 - @wordpress/is-shallow-equal@1.2.0
 - @wordpress/jest-console@3.0.0
 - @wordpress/jest-preset-default@4.0.0
 - @wordpress/jest-puppeteer-axe@1.0.0
 - @wordpress/keycodes@2.1.0
 - @wordpress/library-export-default-webpack-plugin@1.1.0
 - @wordpress/list-reusable-blocks@1.2.0
 - @wordpress/notices@1.2.0
 - @wordpress/npm-package-json-lint-config@1.2.0
 - @wordpress/nux@3.1.0
 - @wordpress/plugins@2.1.0
 - @wordpress/postcss-themes@2.0.0
 - @wordpress/priority-queue@1.0.0
 - @wordpress/redux-routine@3.1.0
 - @wordpress/rich-text@3.1.0
 - @wordpress/scripts@3.0.0
 - @wordpress/shortcode@2.1.0
 - @wordpress/token-list@1.2.0
 - @wordpress/url@2.4.0
 - @wordpress/viewport@2.2.0
 - @wordpress/wordcount@2.1.0

This also includes the update to the scripts dependencies and the new widgets php files.

Props iseulde.
Fixes #46429.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 09:09:59 +00:00
Aaron Jorbin
029fcf7791 Script Loader: Load fakejshint as jshint due to "good and evil".
Originally fixed in [42547]. Broken in [44163]. We've been here before. I recognize that tree.

Fixes #46299

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


git-svn-id: http://core.svn.wordpress.org/trunk@44594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-21 21:19:50 +00:00
youknowriad
a89b6c042d Block Editor: Update WordPress Packages to solve PHP 5.2.2 parser incompatibility.
Updated:

 - @wordpress/block-library@2.2.16
 - @wordpress/block-serialization-default-parser@2.0.5
 - @wordpress/blocks@6.0.7
 - @wordpress/edit-post@3.1.11
 - @wordpress/editor@9.0.11
 - @wordpress/format-library@1.2.14

Props pento.
Fixes #46200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-02-07 09:02:49 +00:00
youknowriad
3c7a623f85 Block Editor: Update WordPress Packages to the latest versions.
Updated Packages:

 - @wordpress/annotations@1.0.8
 - @wordpress/block-library@2.2.15
 - @wordpress/components@7.0.8
 - @wordpress/edit-post@3.1.10
 - @wordpress/editor@9.0.10
 - @wordpress/format-library@1.2.13
 - @wordpress/list-reusable-blocks@1.1.21
 - @wordpress/nux@3.0.9
 - @wordpress/rich-text@3.0.7

Fixes list block indentation and Crowdsignal embed block.

Props iseulde.
Fixes #46137.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-29 18:23:55 +00:00
Dominik Schilling
8af55f1578 Script Loader: Add missing semicolon.
Fixes #46131.
Built from https://develop.svn.wordpress.org/trunk@44709


git-svn-id: http://core.svn.wordpress.org/trunk@44540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-28 21:59:49 +00:00
Gary Pendergast
445209c9eb Menus: Remove error styling when the user addresses the error.
An error is triggered if a Menu Name isn't given when the user attempts to create a menu. When they go back and add a name, the error styling can be removed.

Props ashokrd2013, piyush9100, welcher, afercia.
Fixes #42321.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 22:10:49 +00:00
Andrew Ozz
b7897c5761 TinyMCE: retire wp-tinymce.php and remove pre-compression of wp-tinymce.js.
Fixes #45645.
Built from https://develop.svn.wordpress.org/trunk@44651


git-svn-id: http://core.svn.wordpress.org/trunk@44482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-18 19:51:53 +00:00
Gary Pendergast
14c44ad703 Block Editor: Upgrade the @wordpress/ packages.
This brings the block editor in core up to date with the Gutenberg 4.8 plugin release.

Props aduth, gziolo, youknowriad, mkaz, jorgefilipecosta, swissspidy, iseulde, soean, noisysocks, joen, brentswisher, dekervit, dimadin, zebulan, johnny5, nosolosw, netweb, ryelle, etoledom, mzorz, desrosj, mmtr86, tinkerbelly, ocean90, earnjam, ajitbohra, talldanwp, notnownikki, mcsf, afercia, adamsilverstein, gutendev, naoki0h, miyauchi, aldavigdis.
Fixes #45885.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-10 01:54:56 +00:00
Dominik Schilling
f34e1dbad1 I18N: Make domain argument optional in wp_set_script_translations() / WP_Scripts::set_translations().
Props swissspidy.
Fixes #45489.
Built from https://develop.svn.wordpress.org/trunk@44395


git-svn-id: http://core.svn.wordpress.org/trunk@44225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 21:12:50 +00:00
Dominik Schilling
d31335da85 Script Loader: Load unminified package vendor scripts when SCRIPT_DEBUG is set.
The unminified package vendor scripts are bundled with the release package thus the value of the `SCRIPT_DEBUG` constant should be honored.

Props earnjam.
See #45535.
Built from https://develop.svn.wordpress.org/trunk@44391


git-svn-id: http://core.svn.wordpress.org/trunk@44221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-04 20:27:49 +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
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
75dfa5f7f6 Script Loader: Pass the suffix to package style handles to ensure correct file names for minified RTL stylesheets.
Props ocean90.

Merges [44231] into trunk.

See #45547.
Built from https://develop.svn.wordpress.org/trunk@44314


git-svn-id: http://core.svn.wordpress.org/trunk@44144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:31:29 +00:00
desrosj
7da2e20f4d Script Loader: Misplaced parenthesis when wp-tinymce-lists is added.
A closing parenthesis was misplaced in the `$scripts->add( 'wp-tinymce-lists' )` call, causing the dependencies and version to be incorrectly passed to `includes_url()` instead.

Also, Remove an incorrect parameter sent to `wp_get_script_polyfill()`. `wp_get_script_polyfill()` only accepts two parameters, but this call was passing a third.

Props volodymyrkolesnykov, swissspidy.

Merges [44208] and [44211] into trunk.

Fixes: #45506, #45472.
Built from https://develop.svn.wordpress.org/trunk@44308


git-svn-id: http://core.svn.wordpress.org/trunk@44138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:26:37 +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
985bed281c Scripts: Ensure sub-directory WordPress installs can load polyfill scripts.
`wp_get_script_polyfill()` bypasses `WP_Scripts::do_item()`, so didn't transform the script path into its fully qualified URL.

Props swissspidy, ocean90.
Merges [43960] to trunk.
Fixes #45469.
Built from https://develop.svn.wordpress.org/trunk@44286


git-svn-id: http://core.svn.wordpress.org/trunk@44116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-18 04:05:48 +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
e188e2d3a3 Block Editor: Fix the WordPress packages and vendor script registration.
The version is set properly and the scripts are automatically loaded in the footer.

This patch also includes a revert for the reusable blocks enqueue script.

Props pento, swissspidy, youknowriad.

Merges [43942] into trunk.

Fixes #45402.
See #45396.
Built from https://develop.svn.wordpress.org/trunk@44277


git-svn-id: http://core.svn.wordpress.org/trunk@44107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 19:34:52 +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
820f643bff Core Editor: Specify script versions for the WordPress packages and their vendor dependencies.
Using the `package.json` versions of the NPM dependencies as versions when registering the WordPress scripts.

Props dimadin, dd32, youknowriad.

Merges [43925] to trunk.

Fixes #45187.
Built from https://develop.svn.wordpress.org/trunk@44271


git-svn-id: http://core.svn.wordpress.org/trunk@44101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 18:19:50 +00:00
desrosj
2899f355a9 TinyMCE: Run the filters for the Classic block.
The `wp_editor_settings` and `disable_captions` filters need to be run for the Classic Block.

This fixes possible regressions in plugins that use these filters, and plugins that use them to add filters for the buttons, external plugins, etc.

Props azaozz.

Merges [43914] into trunk.

Fixes #45348.
Built from https://develop.svn.wordpress.org/trunk@44265


git-svn-id: http://core.svn.wordpress.org/trunk@44095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:03:51 +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
desrosj
bbe9a37b6c Editor: Add custom fields meta box support in the block editor.
This brings support for the custom fields meta box into the new block editor.

The `webpack` and `copy-webpack-plugin` packages have also been updated.

This does not bump the `@wordpress` packages like in [43861] because of conflicts with package versions already installed in `trunk`. The packages will be brought up to date in a subsequent merge.

Merges [43861] and [43863] into trunk.

See #45145.
Fixes #45257.
Built from https://develop.svn.wordpress.org/trunk@44260


git-svn-id: http://core.svn.wordpress.org/trunk@44090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:52:51 +00:00
Sergey Biryukov
07ce537eb8 Build Tools: Minify the package CSS when building.
CSS coming from the `@wordpress` packages wasn't being minified in the build. This had the noteable side effect of causing RTL CSS to not be loaded when `SCRIPT_DEBUG` was set to `false`.

Props websupporter.
Merges [43905] to trunk.
Fixes #45330.
Built from https://develop.svn.wordpress.org/trunk@44252


git-svn-id: http://core.svn.wordpress.org/trunk@44082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:28:06 +00:00
Sergey Biryukov
dbc692fb84 Block Editor: Load TinyMCE inline scripts later.
Previously, the TinyMCE inline scripts were added on the `init` action in the block editor. In the classic editor, however, these scripts are loaded when the TinyMCE window is printed, and some plugins rely on them being loaded later, so they can attach to the appropriate filters.

Props pento.
Merges [43901] to trunk.
Fixes #45338.
Built from https://develop.svn.wordpress.org/trunk@44251


git-svn-id: http://core.svn.wordpress.org/trunk@44081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:27:12 +00:00
Sergey Biryukov
909cddb3b8 Scripts: Fix a PHP error in admin-ajax calls.
When making an ajax request, `wp_enqueue_registered_block_scripts_and_styles()` checked if `is_admin()` was true before accessing `$current_screen`, rather than checking if `$current_screen` was defined. This is usually fine, execept for in ajax requests.

Props ocean90, foreverpinetree, pento.
Merges [43893] and [43894] to trunk.
Fixes #45302.
Built from https://develop.svn.wordpress.org/trunk@44249


git-svn-id: http://core.svn.wordpress.org/trunk@44079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:25:31 +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
Sergey Biryukov
9e54ec265c I18N: Set translations for all WordPress packages scripts.
Calls `wp_set_script_translations` for all packages scripts that have translations. Also correctly sets the domain on the translations.

Props omarreiss, pento, ocean90.
Merges [43878] to trunk.
Fixes #45161.
Built from https://develop.svn.wordpress.org/trunk@44239


git-svn-id: http://core.svn.wordpress.org/trunk@44069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:17:04 +00:00
Sergey Biryukov
030b1ba144 PHPCS: Fix errors introduced in [44236].
See #45221.
Built from https://develop.svn.wordpress.org/trunk@44238


git-svn-id: http://core.svn.wordpress.org/trunk@44068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:16:12 +00:00
Sergey Biryukov
86bff28a19 Script Loader: Ensure default packages are registered when loaded via load-scripts.php.
Props CantoThemes, ocean90.
Merges [43877] to trunk.
Fixes #45271.
Built from https://develop.svn.wordpress.org/trunk@44237


git-svn-id: http://core.svn.wordpress.org/trunk@44067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:15:20 +00:00
Sergey Biryukov
c72f02aa49 TinyMCE:
- Fix parsing of the init array in script-loader.
- Do not JSON encode the options object when outputting it from PHP.
- Remove JSON decoding of TinyMCE's `style_formats` option.

Props azaozz.
Merges [43867] to trunk.
Fixes #45221.
Built from https://develop.svn.wordpress.org/trunk@44236


git-svn-id: http://core.svn.wordpress.org/trunk@44066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:14:31 +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
5b16eb19a8 Script Loader: Add translator comments and remove textdomains.
The inline script for `wp-date` incorrectly included a textdomain, and lacked translator comments.

Merges [43831] from the 5.0 branch to trunk.

Props mukesh27.
Fixes #45191, #45162.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 05:58:52 +00:00