buDefaultThemes (color themes) don't get appended to editor-settings
object on non-prepress post types
#311
Labels
editor-settings
object on non-prepress post types
#311
This bug was found during CFA by @hirozed and I. The
buDefaultThemes
function here:https://github.com/bu-ist/bu-blocks/blob/develop/src/init.php#L232
is limited to only load on post types returned in the
bu_prepress_get_post_types()
function. So when blocks are extended to non-prepress post types this seems to fail and the editor settings don't have thebuDefaultThemes
color arrays to use. Since non-prepress post types don't have apublication
applied thebuPublicationThemes
part of the blocks also doesn't work (as expected) so you get no color themes showing up.I think we need to remove this and try loading the
buDefaultThemes
everywhere.A PR for CFA has more details written up: https://github.com/bu-ist/r2-cfa/pull/271
Here is an example of how a block ultimately loads the colors from either
buDefaultThemes
orbuPublicationThemes
: https://github.com/bu-ist/bu-blocks/blob/develop/src/blocks/pullquote/pullquote.js#L204The text was updated successfully, but these errors were encountered: