Commit Graph

69 Commits

Author SHA1 Message Date
desrosj
eeb8c63240 Docs: Various filter docblock improvements.
Follow up to [50776], [50956], [50983].

See #52920.
Built from https://develop.svn.wordpress.org/trunk@51237


git-svn-id: http://core.svn.wordpress.org/trunk@50846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-25 14:40:57 +00:00
desrosj
fccc020d29 Docs: Various docblock corrections for code added in 5.8.
Props johnbillion.
See #53461.
Built from https://develop.svn.wordpress.org/trunk@51221


git-svn-id: http://core.svn.wordpress.org/trunk@50830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 19:05:57 +00:00
desrosj
821327ca70 Editor: Correct variable names in get_block_editor_settings().
Incorrect variable names were leading to unreachable conditional statements.

Follow up to [51149].

Props johnbillion, mukesh27.
See #53458.
Built from https://develop.svn.wordpress.org/trunk@51213


git-svn-id: http://core.svn.wordpress.org/trunk@50822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-23 00:26:58 +00:00
desrosj
8ea2e04925 Editor: Allow custom-units to be an array.
The changes in [50959] introduced an issue where `custom_units` was always being coerced into a boolean value. This should support `array` values.

Props kraftner, youknowriad, nosolosw, jorgefilipecosta.
Fixes #53472.
Built from https://develop.svn.wordpress.org/trunk@51203


git-svn-id: http://core.svn.wordpress.org/trunk@50812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 17:16:58 +00:00
desrosj
5259b18f50 Widgets: Add editor styles to the widgets block editor.
This updates the widgets screen to load the editor styles in the same way as the post editor. This combined with the package updates in [51198] and [51199] ensures that the blocks added to sidebars more accurately reflect what will be displayed on the front end of the site.

Props isabel_brison, noisysocks, andraganescu, audrasjb, jorbin, caseymilne, desrosj.
Fixes #53344. See #53388.
Built from https://develop.svn.wordpress.org/trunk@51200


git-svn-id: http://core.svn.wordpress.org/trunk@50809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-22 13:33:58 +00:00
youknowriad
c114304471 Block Editor: Update the WordPress packages with the fixes for 5.8 beta 2.
This includes:

**Various**

 - Fix multi selection for nested blocks https://github.com/WordPress/gutenberg/pull/32536
 - Consistently show the drop indicator while dragging blocks https://github.com/WordPress/gutenberg/pull/31896
 - Fix horizontal drop indicator https://github.com/WordPress/gutenberg/pull/32589
 - Fix Safari flickering issue https://github.com/WordPress/gutenberg/pull/32581
 - Silence useSelect zombie bug errors https://github.com/WordPress/gutenberg/pull/32088

**Template Editor**

 - Clarify the template creation modal https://github.com/WordPress/gutenberg/pull/32427
 - Only add skip links for block templates https://github.com/WordPress/gutenberg/pull/32451

**Widgets Editor**

 - Add block breadcrumb https://github.com/WordPress/gutenberg/pull/32498 https://github.com/WordPress/gutenberg/pull/32528 https://github.com/WordPress/gutenberg/pull/32569
 - Saved deleted and restored widgets. https://github.com/WordPress/gutenberg/pull/32534
 - Fix unsaved changes detection https://github.com/WordPress/gutenberg/pull/32573
 - Fix button spacing in the header https://github.com/WordPress/gutenberg/pull/32585
 - Avoid extra undo levels https://github.com/WordPress/gutenberg/pull/32572
 - Move Legacy Widget block to the `@wordpress/widgets` package https://github.com/WordPress/gutenberg/pull/32501
 - Fix Social Links color inheritance https://github.com/WordPress/gutenberg/pull/32625
 - Use Button appender https://github.com/WordPress/gutenberg/pull/32580

**Global Styles (theme.json)**
 
 - Separate the presets per origin in the block editor settings https://github.com/WordPress/gutenberg/pull/32358 https://github.com/WordPress/gutenberg/pull/32622
 - Use CSS Custom Properties for the preset styles https://github.com/WordPress/gutenberg/pull/32627

**Performance**

 - Remove is-typing classname to improve typing performance https://github.com/WordPress/gutenberg/pull/32567

Props nosolosw, jorgefilipecosta, aristath, ntsekouras, peterwilsoncc, mcsf.
See #53397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-15 08:52:30 +00:00
youknowriad
446dd1768a Block Editor: Add a type property to allow Core to identify the source of the editor styles.
Gutenberg plugin need to override the editor styles provided by core selectively,
this added property allows it to do so without committing to a public API.

Props nosolosw, jorgefilipecosta.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 08:15:57 +00:00
noisysocks
6531090038 Enable Meta and Nav Menu widgets in Legacy Widget block
Allows users to insert a Meta or Nav Menu widget using the Legacy Widget block,
as there is not yet a block equivalent for the Meta and Nav Menu widgets.

Fixes #53301.
Props celloexpressions, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 00:40:57 +00:00
jorgefilipecosta
60d7dcdc61 Block Editor: Fix logic to enable custom colors, gradients, and font sizes.
The logic to enable or disabled colors, gradients, and font sizes missed a negative operator, so when things should be enabled they weren't and they should be disabled they were enabled. This commit fixes the logic.

Props ntsekouras.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@51031


git-svn-id: http://core.svn.wordpress.org/trunk@50640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 14:25:59 +00:00
noisysocks
81f62198c3 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Fixes #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:40:25 +00:00
gziolo
cfa7f89ba0 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 21:21:57 +00:00
jorgefilipecosta
18200cc30c Block Editor: Add Global Styles support using theme.json file.
This is the second piece of landing the theme.json processing in WordPress core. 
It includes the mechanism that outputs the CSS styles of a theme.json file.

Props nosolosw, youknowriad.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@50973


git-svn-id: http://core.svn.wordpress.org/trunk@50582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 17:39:57 +00:00
gziolo
a380cdd21a Editor: Remove unused param in get_default_block_editor_settings
Follow-up for [50776].

Props nosolosw.
See #52920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 10:23:56 +00:00
youknowriad
4e1dc7a28c Block Editor: Add Global Settings support using theme.json file.
This is the first piece of landing the theme.json processing in WordPress core. 
It allows themes to configure the different editor settings, allow cusomizations and define presets in theme.json file.
 
Props jorgefilipecosta, nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:37:55 +00:00
gziolo
4ae98860b9 Editor: Extract block_editor_rest_api_preload method for use with different editor screens
It is going to be used on the new widgets editor screen. This patch also introduced a new class WP_Block_Editor_Context that is going to be used with revised block editor filters to let extenders to keep their existing behavior. It should also allow to provide more settings through the context class as new screens get introduced like the navigation editor.

Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:32:55 +00:00
gziolo
ff46fda58d Editor: Remove editor type specific filters for block editor configuration
Aligns with changes introduced in the Gutenberg plugin. The planned follow-up replace the editor name string with a context object to bring back an optional reference to the actual post.

Props youknowriad.
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 15:08:00 +00:00
gziolo
f6f8094b1d Editor: Fix typo in image default size setting
Related change in Gutneberg: https://github.com/WordPress/gutenberg/pull/31324

Props mamaduka.
See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-29 10:12:05 +00:00
gziolo
267f9d7479 Editor: Shape block editor filters to work better with the Gutenberg plugin
This should allow to use new filters in the Gutenberg plugin and therefore it prevents deprecation warnings when in the debug mode.

See #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 09:32:06 +00:00
gziolo
f4f125b869 Editor: Abstract block editor configuration
There are several WordPress hooks defined on the server that depend on $post object that isn’t present on the new screens like edit site, edit widgets, or edit navigation. This patch deprecates existing filters and introduces replacements that are context-aware.

Props azaozz, andraganescu, jeremyfelt, nosolosw, youknowriad.
See #52920.




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


git-svn-id: http://core.svn.wordpress.org/trunk@50385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 05:12:05 +00:00