Commit Graph

14 Commits

Author SHA1 Message Date
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
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
atimmer a62df4d7a7 Build tools: Fix the `travis:js` build.
After [44359] it is impossible to not use ES6 syntax for some logic in the `Gruntfile.js`, so adjust the `esversion` setting for the `Gruntfile.js` to 6. Because the previous setting in `.jshintrc` was not compatible with setting `esversion`, set the `esversion` in the `.jshintrc` explicitly.

See #44492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@44191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:54:48 +00:00
atimmer 10d1bc5b7c Build tools: Fix the `grunt format:php` build.
Re-add variable that was removed on accident by [44359]. Also run `grunt format:php` to adjust the code style.
.--This line, and those below, will be ignored--

M    Gruntfile.js
M    src/index.php
M    src/wp-admin/index.php
M    src/wp-includes/class-wp-block-parser.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@44190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-24 13:45:49 +00:00
desrosj 5a30da57c6 PHP 7.3 Compatibility: Fix compact related notices.
In PHP 7.3, the `compact()` function has been changed to issue an `E_NOTICE` level error if a passed string refers to an unset variable. In previous versions of PHP, this notice was silently skipped. This fixes a few more instances of unset variables in the WordPress admin.

The full RFC can be viewed here: https://wiki.php.net/rfc/compact.

See #44416.

Merges [44185] into trunk.

Fixes #45483.
Built from https://develop.svn.wordpress.org/trunk@44297


git-svn-id: http://core.svn.wordpress.org/trunk@44127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-19 03:17: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
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 e06611512c Block Editor: Expose value of `user_can_richedit()`.
In order for the Block Editor to know whether to allow visual editing, it needs to know the value of `user_can_richedit()`.

Props youknowriad, danielbachhuber.

Merges [43916] into trunk.

Fixes #45375.
Built from https://develop.svn.wordpress.org/trunk@44267


git-svn-id: http://core.svn.wordpress.org/trunk@44097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:09:51 +00:00
desrosj 9510a4f036 PHPCS: Fix code formatting issues.
In [44264], several code formatting issues were introduced. This fixes them.
Built from https://develop.svn.wordpress.org/trunk@44266


git-svn-id: http://core.svn.wordpress.org/trunk@44096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 17:07:52 +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 c2f3636e4a Blocks: Parse blocks when displaying posts.
Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

Props pento.

Merges [43752] to trunk.

See #45109.
Built from https://develop.svn.wordpress.org/trunk@44118


git-svn-id: http://core.svn.wordpress.org/trunk@43948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 22:22:38 +00:00
desrosj 24f247267f Blocks: Introduce the block parser.
The `WP_Block_Parser` class, and the accompanying `parse_blocks()` helper function, can be used to parse an array of blocks out of a content string.

`WP_Block_Parser` is copied from the `@wordpress/block-serialization-default-parser` package. To ensure it stays in sync with the JavaScript parser, changes should be implemented in the package first, then the package version should be upgraded to include the changes.

Props pento.

Merges [43751] to trunk.

See #45109.
Built from https://develop.svn.wordpress.org/trunk@44116


git-svn-id: http://core.svn.wordpress.org/trunk@43946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-13 17:40:39 +00:00