The npm packages needed a second part to the update for 6.4 RC1.
Props isabel_brison, andrewserong, jsnajdr, wildworks, joen, mciampini, tyxla, youknowriad, ramonopoly, spacedmonkey, dmsnell, mikachan, kishanjasani, czapla, siobhyb, darerodz, luisherranz
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56945
git-svn-id: http://core.svn.wordpress.org/trunk@56456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update the `@wordpress/block-serialization-default-parser` to 4.35.1 for WordPress 6.3 Beta 1. These changes split the following classes in to their own files in order to match the WordPress PHP coding standards:
* `WP_Block_Parser_Block`
* `WP_Block_Parser_Frame`
* `WP_Block_Parser`
These classes were previously all included in the `src/wp-includes/class-wp-block-parser.php` file. In order to maintain backward compatibly for developers requiring the file directly, the relocated classes are replaced with `require_once` calls in the original file.
In order to retain the commit history of the new files, they have been created using the `svn copy` command.
Props aristath, rajanpanchal2028, jrf, SergeyBiryukov, costdev, manfcarlo, spacedmonkey, mukesh27, isabel_brison, dd32.
Fixes#57832.
See #58623.
Built from https://develop.svn.wordpress.org/trunk@56048
git-svn-id: http://core.svn.wordpress.org/trunk@55560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In addition to all the packages being updated to the latest versions,
this commit also includes some mandatory changes to avoid editor breakage:
- Update React to to 18.2.0.
- Add the right stylesheets to support iframed block editors.
Props ntsekouras, mamaduka, flixos90, desrosj, peterwilsoncc.
See #57471.
Built from https://develop.svn.wordpress.org/trunk@55246
git-svn-id: http://core.svn.wordpress.org/trunk@54779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This affects:
* `WP_Block_Parser::parse()`
* `WP_Block_Parser::$output`
Both the method and the property are documented as returning `WP_Block_Parser_Block[]` (an array of `WP_Block_Parser_Block` objects), but the result is in fact an array of arrays of various values, so `array[]` is the correct notation.
Follow-up to [43751] for the 5.0 branch, [44116] for trunk.
Props Chouby.
Fixes#56581.
Built from https://develop.svn.wordpress.org/trunk@54194
git-svn-id: http://core.svn.wordpress.org/trunk@53753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This affects:
* `WP_Block_Parser::$empty_attrs`
* `WP_Block_Parser::next_token()`
* `WP_Block_Parser::freeform()`
* `WP_Block_Parser_Block::$innerContent`
The `@since` tags referred to early Gutenberg versions instead of WordPress core. These properties and methods were introduced in WordPress 5.0, so `5.0.0` is the correct version.
Some of the other `@since` tags are removed, as they are related to early Gutenberg development before it was merged into WordPress core, and are not relevant for core.
Follow-up to [43751], [43884], [43955] for the 5.0 branch, [44116], [44261], [44281] for trunk.
Props Chouby.
See #56581.
Built from https://develop.svn.wordpress.org/trunk@54193
git-svn-id: http://core.svn.wordpress.org/trunk@53752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
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
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
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