Open bobbingwide opened 6 years ago
Also, add support for stlying SVG icons created using the enhanced bw_dash shortcode.
The colour palette needs to be changed. The API was updated after Gutenberg 2.8
Each colour now needs to be defined with colour classes, which requires each colour to be defined with name
, slug
and color
attributes.
With the existing code we get different results depending on whether or not Gutenberg is activated. The tick appears when Gutenberg is active. No idea why there are 7 circles. In the original code I only defined 4 colours.
Apparently the structure for the $colours array that editor-color-palette
expects has changed again.
Gutenberg produces Notice: Undefined index: slug messages for each custom color that doesn't have values for slug
.
Looks like I added the name
field but forgot to add slug
.
C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php(279:2) bw_trace_error_handler(1) 44 3 2020-08-07T14:03:53+00:00 0.369306 0.000207 cf=wp_head,wp_enqueue_scripts 6437 41 21459 6291456/6291456 256M F=967 err default output handler,bw_trace_output_callback
Array
[0] => (integer) 8
[1] => (string) "Notice: Undefined index: slug"
[2] => (string) "C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php"
[3] => (integer) 207
0. bw_lazy_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\libs\bwtrace.php:108 0
1. bw_backtrace C:\apache\htdocs\wordpress\wp-content\plugins\oik-bwtrace\includes\bwtrace-actions.php:286 0
2. bw_trace_error_handler(8,Undefined index: slug,C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php,207,array) C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php:207 5
3. gutenberg_experimental_global_styles_get_theme_presets C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php:240 0
4. gutenberg_experimental_global_styles_get_theme C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php:558 0
5. gutenberg_experimental_global_styles_get_merged_origins C:\apache\htdocs\wordpress\wp-content\plugins\gutenberg\lib\global-styles.php:570 0
6. gutenberg_experimental_global_styles_enqueue_assets() C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:287 1
7. apply_filters(unsupported,array) C:\apache\htdocs\hm\wp-includes\class-wp-hook.php:311 2
...
In WordPress 5.0 we expect there to be a new editor.
This editor will provide support for some new theme options.
We can considering enhancing this theme to be ready for this.
Color palette
Define a limited set for use on https://herbmiller.me
Opt-in features
'align-wide'
For more info see https://wordpress.org/gutenberg/handbook/extensibility/theme-support/
Almost identical to https://github.com/wppompey/wp-pompey/issues/2