Commit Graph

22 Commits

Author SHA1 Message Date
Sergey Biryukov
710f30eb96 Docs: Fix typo in the get_block_editor_settings() description.
Follow-up to [50776].

Props tmatsuur, pbearne.
Fixes #53922.

git-svn-id: https://develop.svn.wordpress.org/trunk@51611 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-15 12:44:26 +00:00
John Blackbourn
28ea7b18cf Docs: Corrections and improvements to types used in docblocks for symbols, properties, and filters.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@51298 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-01 21:01:17 +00:00
Riad Benguella
69ead0f406 Block Editor: Do not load a default font family for themes with theme.json.
This matches the behavior that has been in place in the gutenberg plugin.
The idea is that this makes the editor match the frontend by default for these themes.
If they use a custom font, they'll have to provide it for the editor as editor styles.

Props nosolosw.


git-svn-id: https://develop.svn.wordpress.org/trunk@51240 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 15:31:21 +00:00
Jonathan Desrosiers
e27b245ea6 Docs: Various filter docblock improvements.
Follow up to [50776], [50956], [50983].

See #52920.

git-svn-id: https://develop.svn.wordpress.org/trunk@51237 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 14:39:13 +00:00
Jonathan Desrosiers
3073bb0f19 Docs: Various docblock corrections for code added in 5.8.
Props johnbillion.
See #53461.

git-svn-id: https://develop.svn.wordpress.org/trunk@51221 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 19:04:51 +00:00
Jonathan Desrosiers
1af21df75b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51213 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-23 00:25:14 +00:00
Jonathan Desrosiers
f3b1cc24e4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51203 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-22 17:15:27 +00:00
Jonathan Desrosiers
31adfecbf3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51200 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-22 13:32:42 +00:00
Riad Benguella
0068f2646c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51149 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-15 08:50:26 +00:00
Riad Benguella
900367bc7a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51090 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-08 08:14:59 +00:00
Robert Anderson
e46ffeb5b1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@51067 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-04 00:39:57 +00:00
Jorge Costa
6945095a3e 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@51031 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-26 14:24:17 +00:00
Robert Anderson
00bc227eb8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50996 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-25 08:38:04 +00:00
Greg Ziółkowski
b589f04a03 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50983 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 21:20:31 +00:00
Jorge Costa
3d3aa3cd09 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50973 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 17:38:59 +00:00
Greg Ziółkowski
c35bfc0378 Editor: Remove unused param in get_default_block_editor_settings
Follow-up for [50776].

Props nosolosw.
See #52920.




git-svn-id: https://develop.svn.wordpress.org/trunk@50963 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 10:22:08 +00:00
Riad Benguella
ef3da3363a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@50959 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 08:36:11 +00:00
Greg Ziółkowski
2a389ad7b7 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@50956 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 07:31:49 +00:00
Greg Ziółkowski
0b6eb8daba 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50920 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 15:06:27 +00:00
Greg Ziółkowski
f826a6a858 Editor: Fix typo in image default size setting
Related change in Gutneberg: https://github.com/WordPress/gutenberg/pull/31324

Props mamaduka.
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50798 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-29 10:10:38 +00:00
Greg Ziółkowski
4ac39957a2 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@50777 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-21 09:30:40 +00:00
Greg Ziółkowski
a19f589a5f 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.





git-svn-id: https://develop.svn.wordpress.org/trunk@50776 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-21 05:10:56 +00:00