The meta_input, file, and guid fields are not intended to be updated through user input.
Merges [44047] to trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@44295 602fd350-edb4-49c9-b593-d223f7449a82
When editing a page set to be the Privacy Policy page, display a help notice
containing a link to the Privacy Policy guide.
Merges [43920] to trunk.
Fixes#45057.
git-svn-id: https://develop.svn.wordpress.org/trunk@44291 602fd350-edb4-49c9-b593-d223f7449a82
If a meta box is registered with the `__block_editor_compatible_meta_box` set to `false`, it's indicating that it doesn't work in the block editor. If that's the case, we can add a place holder to inform the user that they'll need to use the classic interface to work with this meta box.
Props pento, jorgefilipecosta, peterwilsoncc, karmatosed, noisysocks, dd32, ocean90.
Merges [43941] and [43945] to trunk.
Fixes#45217.
git-svn-id: https://develop.svn.wordpress.org/trunk@44280 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44277 602fd350-edb4-49c9-b593-d223f7449a82
This ensures the "import from JSON" and "export JSON" buttons are shown properly. The script is loaded in the footer because it relies on the DOM being already there.
Props noisysocks, mukesh27.
Merges [43936] into trunk.
Fixes#45396.
git-svn-id: https://develop.svn.wordpress.org/trunk@44274 602fd350-edb4-49c9-b593-d223f7449a82
In RTL languages, WordPress adds `style-editor-rtl.css` editor styles to the global `$editor_styles`.
This patch ignores handling these styles if the file is not preset.
Also, clarify the docs for the return value of the `block_version` function.
Props mostafa.s1990, desrosj, mukesh27.
Merges [43923] and [43924] to trunk.
Fixes#45288, #45342.
git-svn-id: https://develop.svn.wordpress.org/trunk@44270 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44267 602fd350-edb4-49c9-b593-d223f7449a82
The About page describes all the great changes in WordPress 5.0.
Highlights:
- Warn users of Gutenberg plugin of its deactivation upon 5.0 upgrade.
- Added illustrations to the Four Freedoms page.
- Include a link to wporg user’s plugin favorites as a way to display only the classic plugin as a suggestion for install.
- Detail the Classic Editor plugin and the support timeline.
Props pixelverbieger, ocean90, karmatosed, pento, boemedia, lonelyvegan, sami.keijonen, TimothyBlynJacobs, xkon, afercia, laurelfulford, joostdevalk, ipstenu, matveb, joen, tinkerbelly, chanthaboune, kjellr, alexislloyd, melchoyce, mcsf, courtney0burton, Otto42, cathibosco, tobifjellner, helen, audrasjb, antpb, jjj, elrae, desrosj, azaozz, joemcgill, skithund, gziolo.
Merges [43913], [43921-43922], [43937-43938], [43946-43947], [43952-43953], [43967-43969] into trunk.
Fixes#45178.
git-svn-id: https://develop.svn.wordpress.org/trunk@44264 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44261 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44260 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44251 602fd350-edb4-49c9-b593-d223f7449a82
Some plugins remove the Custom Fields meta box, particularly when they provide functionality that replaces it. The block editor would correctly not display this meta box in these circumstances, but it still showed the option to display or hide it.
Props pento, noisysocks.
Merges [43885] to trunk.
See #45282.
git-svn-id: https://develop.svn.wordpress.org/trunk@44244 602fd350-edb4-49c9-b593-d223f7449a82
Lacking an appropriate action in the classic editor, plugins that add meta boxes have historically hooked into various actions in order to add hidden input fields.
This change also adds backwards compatibility for two of the most common: `edit_form_after_title`, and `edit_form_advanced`.
Props pento, danielbachhuber.
Merges [43882] to trunk.
Fixes#45283.
git-svn-id: https://develop.svn.wordpress.org/trunk@44241 602fd350-edb4-49c9-b593-d223f7449a82
Meta boxes are loaded inside a wrapper form, that the block editor submits as part of the saving process. It shouldn't be submitted manually.
Props pento.
Merges [43880] to trunk.
Fixes#45284.
git-svn-id: https://develop.svn.wordpress.org/trunk@44240 602fd350-edb4-49c9-b593-d223f7449a82
If a plugin returns a non-string value (or returns `null`) on these filters, it can cause errors in the block editor. Casting them as a string prevents these errors.
Merges [43858] from the 5.0 branch to trunk.
Props dd32.
See #45236.
git-svn-id: https://develop.svn.wordpress.org/trunk@44224 602fd350-edb4-49c9-b593-d223f7449a82
CodeMirror is no longer used in the block editor, so we don't need to load the settings.
Merges [43857] from the 5.0 branch to trunk.
Props noisysocks.
Fixes#45248.
git-svn-id: https://develop.svn.wordpress.org/trunk@44223 602fd350-edb4-49c9-b593-d223f7449a82
Meta boxes that exist for back compat, or that are incompatible with the block editor aren't displayed, so they don't need an option to display or hide them in the Options dialog.
Merges [43856] from the 5.0 branch to trunk.
Props noisysocks.
Fixes#45249.
git-svn-id: https://develop.svn.wordpress.org/trunk@44222 602fd350-edb4-49c9-b593-d223f7449a82
This is a followup to [43728], which added the same check, but using the `publicly_queryable` option. This behaviour is incorrect for `_builtin` post types, which go by the logic in `is_post_type_viewable()`, instead.
Merges [43855] from the 5.0 branch to trunk.
Props pento.
See #43278.
git-svn-id: https://develop.svn.wordpress.org/trunk@44221 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44220 602fd350-edb4-49c9-b593-d223f7449a82
The block editor needs to duplicate the classic meta box behaviour, so it can extract the registered meta boxes, and import them into the block editor.
To match the classic editor behaviour as closely as possible, this moves the relevant code from the classic editor, into a new function, so it can be called by both.
Merges [43837] from the 5.0 branch to trunk.
Props pento, peterwilsoncc.
Fixes#45172.
git-svn-id: https://develop.svn.wordpress.org/trunk@44214 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44184 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@44177 602fd350-edb4-49c9-b593-d223f7449a82
We should only be showing this message in the classic editor interface, for meta boxes that are marked as being incompatible with the block editor.
Props pento.
Merges [43839] to trunk.
Fixes#45207.
git-svn-id: https://develop.svn.wordpress.org/trunk@44175 602fd350-edb4-49c9-b593-d223f7449a82
While the documentation for add_meta_box() specifices that $callback_args should be an array, this has never been enforced, and we have workarounds in place for when it's passed as something other than an array.
Rather than break sites that are passing unexpected data, we can quietly just allow for it, instead.
Props johnjamesjacoby, birgire, pento.
Merges [43838] to trunk.
Fixes#45206.
git-svn-id: https://develop.svn.wordpress.org/trunk@44174 602fd350-edb4-49c9-b593-d223f7449a82
Also introduces a `block_editor_preload_paths` filter for plugins and themes to preload additional data.
Merges [43833] from the 5.0 branch to trunk.
Props imath, mattheu, danielbachhuber.
Fixes#45194.
git-svn-id: https://develop.svn.wordpress.org/trunk@44172 602fd350-edb4-49c9-b593-d223f7449a82
When `WP_DEBUG` is set, ensure that a static method callback is passed to `ReflectionMethod`, instead of `ReflectionFunction`.
Merges [43830] from the 5.0 branch to trunk.
Props DrewAPicture.
Fixes#45192.
git-svn-id: https://develop.svn.wordpress.org/trunk@44170 602fd350-edb4-49c9-b593-d223f7449a82
Because the REST API allows meta keys to have empty values, the Custom Fields meta box should permit the same behavior.
Props charlestonsw, soulseekah, danielbachhuber.
Merges [43811] to trunk.
Fixes#43559.
git-svn-id: https://develop.svn.wordpress.org/trunk@44153 602fd350-edb4-49c9-b593-d223f7449a82
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.
Merges [43809,43954] from the 5.0 branch to trunk.
Fixes#45152.
Props jorbin, SergeyBiryukov, pento, mcsf.
git-svn-id: https://develop.svn.wordpress.org/trunk@44151 602fd350-edb4-49c9-b593-d223f7449a82
When meta boxes are registered, they can use the `__back_compat_meta_box` and `__block_editor_compatible_meta_box` flags, to show whether this registration just exists for if the classic editor is loaded, and whether this meta box is compatible with the block editor.
When a meta box marks itself as incompatible with the block editor, and `WP_DEBUG` is enabled, a warning will show inside that meta box in the classic editor.
As all core meta boxes have been recreated in the block editor, they can be marked with the `__back_compat_meta_box` flag.
Merges [43779] from the 5.0 branch to trunk.
See #45112.
git-svn-id: https://develop.svn.wordpress.org/trunk@44132 602fd350-edb4-49c9-b593-d223f7449a82
To allow the block editor to render meta boxes, it needs to collect information about how those meta boxes are registered, and format it for the block editor to make use of.
Merges [43778] from the 5.0 branch to trunk.
See #45112.
git-svn-id: https://develop.svn.wordpress.org/trunk@44131 602fd350-edb4-49c9-b593-d223f7449a82
This method allows checking (or setting) whether the block editor is loading on the current screen.
Merges [43777] from the 5.0 branch to trunk.
See #45037.
git-svn-id: https://develop.svn.wordpress.org/trunk@44130 602fd350-edb4-49c9-b593-d223f7449a82
`use_block_editor_for_post()` and `use_block_editor_for_post_type()` determine if the block editor should be loaded.
`get_block_categories()` and `get_block_editor_server_block_settings()` provide data be included while the block editor is loading.
Props pento.
Merges [43762] to trunk.
See #45110.
git-svn-id: https://develop.svn.wordpress.org/trunk@44122 602fd350-edb4-49c9-b593-d223f7449a82
Fix errors introduced in [43973] due to Jorbin not running the correct tag of wpcs.
Unprops jorbin.
git-svn-id: https://develop.svn.wordpress.org/trunk@43976 602fd350-edb4-49c9-b593-d223f7449a82
In [43437], the link definition implementation caused attachment links to be unexpectedly nested under an attributes key. This changeset restores the prior behavior.
Merges [43681] to trunk.
Props TimothyBlynJacobs, danielbachhuber.
Fixes#44750.
git-svn-id: https://develop.svn.wordpress.org/trunk@43973 602fd350-edb4-49c9-b593-d223f7449a82