Some Customizer-related files contain inline comments referencing work to do for #42364 for 5.0. Those comments are now outdated as #42364 was moved to the 5.1 milestone.
Props dlh.
See #45115.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43887 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.
See #45282.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43885 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 favour 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 favour of a `render_block` filter in `render_block()`.
See #45145, #45190, #45264, #45282.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43884 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.
See #45283.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43882 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.
See #45284.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43880 602fd350-edb4-49c9-b593-d223f7449a82
As `do_blocks()` is run before `wpautop()` in `the_content` filter, we can remove in a Just In Time fashion, before that filter is run.
After `wpautop()`s original priority has passed, we can re-add it in a Just Too Late fashion, to ensure it's available if `the_content` filter is run multiple times on a page load.
Props pento, nerrad.
Fixes#45290.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43879 602fd350-edb4-49c9-b593-d223f7449a82
Calls `wp_set_script_translations` for all packages scripts that have translations. Also correctly sets the domain on the translations.
Props omarreiss, pento, ocean90.
Fixes#45161.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43878 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Seventeen's Gutenberg support, added in #45045. This commit includes the following fixes:
* Update editor placeholder text to use the correct font family.
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment.
Props pento, davidakennedy.
Fixes#45246.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43876 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Sixteen's Gutenberg support, added in #45044. This commit includes the following fixes:
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Correct styles for the editor placeholder text, so it's not inheriting a darker gray from the theme's CSS.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Reset Cover blocks as `display: flex` when they are centered, to maintain their original appearance.
* Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment.
Props pento, davidakennedy.
Fixes#45245.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43875 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Fifteen's Gutenberg support, added in #45043. This commit includes the following fixes:
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Add a margin to blocks that are aligned to the left or to the right, to create space.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment.
Props pento, davidakennedy.
Fixes#45244.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43874 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Fourteen's Gutenberg support, added in #45042. This commit includes the following fixes:
* Update editor placeholder text to use the correct font family.
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Remove unnecessary spacing from the Columns block.
* Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Simplify selectors used to set editor width to just `.wp-block`.
Props pento, davidakennedy.
Fixes#45243.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43873 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Thirteen's Gutenberg support, added in #45041. This commit includes the following fixes:
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Prevent full and wide aligned blocks from getting wider than Twenty Thirteen's design.
* Prevent wide aligned blocks from getting too wide, as they can seem out of proportion with the full aligned blocks.
* Make sure full and wide blocks display at the correct width in the editor.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Make sure wide and full aligned Table blocks span the available width on the front end.
* Add spacing underneath the Media & Text block, but make sure the final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
Props pento, davidakennedy.
Fixes#45242.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43872 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Twelve's Gutenberg support, added in #45040. This commit includes the following fixes:
* Update editor placeholder text to use the correct font family.
* Center text and bullets in list-based widget blocks, when block itself is centered.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
Props pento, davidakennedy.
Fixes#45240.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43871 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Eleven's Gutenberg support, added in #45039. This commit includes the following fixes:
* Center text and bullets in list-based widget blocks when block itself is centered.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment.
Props pento, davidakennedy.
Fixes#45239.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43870 602fd350-edb4-49c9-b593-d223f7449a82
A handful of issues were missed in Twenty Ten's Gutenberg support, added in #45038. This commit includes the following fixes:
* Update editor placeholder text to use the correct font family and size.
* Remove unnecessary spacing from the Columns block.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block.
* Simplify selectors used to set editor width to just `.wp-block`.
Fixes#45238.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43869 602fd350-edb4-49c9-b593-d223f7449a82
Add `add_theme_support( 'responsive-embeds' );` to all of the responsive default themes as part of their Gutenberg support. This makes sure any embeds coming from the new block-based editor maintain their aspect ratios at different screen sizes.
Fixes#45274.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43868 602fd350-edb4-49c9-b593-d223f7449a82
- 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.
Fixes#45221.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43867 602fd350-edb4-49c9-b593-d223f7449a82
This was causing the custom meta box to be incorrectly added to post types that don't support it.
Props ocean90, epointal.
Fixes#45257,
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43863 602fd350-edb4-49c9-b593-d223f7449a82
This brings support for the custom fields meta box to the block editor.
The `webpack` and `copy-webpack-plugin` packages have also been updated.
See #45145.
Fixes#45257.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43861 602fd350-edb4-49c9-b593-d223f7449a82
Improves upon [43825] by adding unit tests to cover additional use-cases and changes loading translations to only occur when outputting the script to allow setting translations on dependencies.
Props atimmer, omarreiss, nerrad, swissspidy, ocean90.
Fixes#45103.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43859 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.
Props dd32.
See #45236.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43858 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.
Props noisysocks.
Fixes#45249.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43856 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.
See #43278.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43855 602fd350-edb4-49c9-b593-d223f7449a82
Ensures `wp_read_video_metadata()`/`wp_read_audio_metadata()` functions are available when uploading video and audio. Fixes error introduced in [43589].
Props ocean90.
See #43757.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43850 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.
See #44489.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43848 602fd350-edb4-49c9-b593-d223f7449a82
`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.
See #44758.
Fixes#45235.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43846 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.
See #45145.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43840 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.
Fixes#45207.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43839 602fd350-edb4-49c9-b593-d223f7449a82