- Remove unnecessary `ol` styles from editor. Twenty Seventeen was designed with bolded numbers for its ordered list styles. This was removed from the theme prior to launch, but it was left in the editor styles, so it needed to be removed there, too.
- To improve accessibility, the cookies content checkbox in the comment form needed some visible indication when it’s in focus.
- Twenty Seventeen’s editor styles contained an Internet Explorer 8 specific fix that stopped images from being scalable in the editor in other browsers. Since the editor no longer supports IE8, this fix can safely be removed.
- Fix the `font-family` used for Simplified Chinese (zh_CN) in the block editor CSS.
Props mmaumio, edpittol, pratikthink, afercia, audrasjb, mihaivalentin, subrataemfluence, vaishalipanchal, ze3kr, laurelfulford.
Merges [44203-44205] and [44235] into trunk.
Fixes#44775, #44699, #39738, #45408.
Built from https://develop.svn.wordpress.org/trunk@44307
git-svn-id: http://core.svn.wordpress.org/trunk@44137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.
This fix is applied to Twenty Sixteen, Twenty Fifteen and Twenty Fourteen.
Props laurelfulford.
Merges [44197-44198] and [44200] into trunk.
Fixes#45428, #45429.
Built from https://develop.svn.wordpress.org/trunk@44306
git-svn-id: http://core.svn.wordpress.org/trunk@44136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.
Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.
Props laurelfulford.
Merges [44195] into trunk.
Fixes#45431.
Built from https://develop.svn.wordpress.org/trunk@44304
git-svn-id: http://core.svn.wordpress.org/trunk@44134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.
Also make sure the button’s gradient is not applied when a custom background color is added, since it will hide it.
Props laurelfulford.
Merges [44194] to trunk.
Fixes#45432.
Built from https://develop.svn.wordpress.org/trunk@44303
git-svn-id: http://core.svn.wordpress.org/trunk@44133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update a mistake in Twenty Eleven's block editor styles that erroneously sets the `font-size` to `300`, when it should set the `font-weight` to `300`. This was causing browsers in quirks mode to make the editor font size very large.
Also, simplify some of the button block’s CSS selectors in the theme, to make sure the default colors don’t override the custom colors on the front end.
Props laurelfulford.
Merges [44190] and [44191] to trunk.
Fixes#45421, #45433.
Built from https://develop.svn.wordpress.org/trunk@44301
git-svn-id: http://core.svn.wordpress.org/trunk@44131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make sure the block editor custom colors in the theme also override the theme's `:visited` link styles. This prevents contrast issues, like in the button block -- when the background is dark, the purple `:visited` link can be difficult to read.
Props laurelfulford.
Merges [44188] into trunk.
Fixes#45434.
Built from https://develop.svn.wordpress.org/trunk@44299
git-svn-id: http://core.svn.wordpress.org/trunk@44129 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
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.
Built from https://develop.svn.wordpress.org/trunk@44280
git-svn-id: http://core.svn.wordpress.org/trunk@44110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
`WP_Query::setup_postdata()` splits the post up by `<!--nextpage-->`, which causes invalid block data to be contained in the post content.
This change removes the `<!-- wp:nextpage -->` and `<!-- /wp:nextpage -->`, as well.
Props pento, youknowriad, azaozz, noisysocks.
Merges [43940] into trunk.
See #45401.
Built from https://develop.svn.wordpress.org/trunk@44276
git-svn-id: http://core.svn.wordpress.org/trunk@44106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@44274
git-svn-id: http://core.svn.wordpress.org/trunk@44104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@44270
git-svn-id: http://core.svn.wordpress.org/trunk@44100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Skips validation where there is no attribute definition, but keeps the attribute value. Previously, the attribute would be omitted from the attributes passed to `render_callback`. Notably, this resolves an issue where `render_callback` cannot receive a block's `align` and `customClassName` attribute values, since these are defined as a client-side filter.
- Validates `null` as a proper value in its own right. Previously, a client implementation of a block could track `{“attribute":null}` as an explicitly empty value, and the server would wrongly initiate defaulting behavior. The new behavior will now only populate a default value if the attribute is not defined at all, including when unset in its being invalid per the attribute schema.
Props aduth, noisysocks, youknowriad, danielbachhuber.
Merges [43918] to trunk.
See #45145 for the patch, #45098 for the original ticket.
Built from https://develop.svn.wordpress.org/trunk@44269
git-svn-id: http://core.svn.wordpress.org/trunk@44099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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.
Built from https://develop.svn.wordpress.org/trunk@44264
git-svn-id: http://core.svn.wordpress.org/trunk@44094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Sixteen includes functionality and styles that make full-size images extend wider than the content when they are added to posts, and appear below the post meta. This update adds the same behavior to image blocks and their captions.
Merges [43911] to trunk.
Props laurelfulford.
Fixes: #45380.
Built from https://develop.svn.wordpress.org/trunk@44263
git-svn-id: http://core.svn.wordpress.org/trunk@44093 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
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
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.
[43908], from the 5.0 branch, was merged into trunk in [44254] and used the now unavailable `$this->server`.
This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.
See #45220, #41641.
Built from https://develop.svn.wordpress.org/trunk@44256
git-svn-id: http://core.svn.wordpress.org/trunk@44086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [42724], `$this->server` was replaced with `rest_get_server()` for better memory recycling.
[43897], from the 5.0 branch, was merged into trunk in [44250] and used the now unavailable `$this->server`.
This updates the new test from the 5.0 branch to use the expected `rest_get_server()`.
See #43316, #41641.
Built from https://develop.svn.wordpress.org/trunk@44255
git-svn-id: http://core.svn.wordpress.org/trunk@44085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [43736], we prevented rendering fields when not present in `?_fields=`. However, because `get_fields_for_response()` is dependent on `get_item_schema()`, any custom fields registered with a null schema would be incorrectly excluded from the response. Because the REST API permits a null schema for `register_rest_field()`, those fields should be included in the available fields for a response.
Props danielbachhuber.
Merges [43908] to trunk.
Fixes#45220.
Built from https://develop.svn.wordpress.org/trunk@44254
git-svn-id: http://core.svn.wordpress.org/trunk@44084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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