Closed whoami-pwd closed 2 years ago
@alexander-kozhukhovski Can you provide more details on this issue? A link to the call would be nice for troubleshooting and a potential solution if you have one.
@alexander-kozhukhovski Can you provide more details on this issue? A link to the call would be nice for troubleshooting and a potential solution if you have one.
Description and possible solution added.
Resolved with https://github.com/moderntribe/square-one/pull/1036
Issue:
It was noticed that the
registerBlockType
filter doesn't run if it is insideready( init );
call.The following example will not work as expected if we put the filter within
init
atwp-content/themes/core/assets/js/src/admin/editor/hooks.js
(here):addFilter( 'blocks.registerBlockType', 'tribe/filter-alignment', setAlignmentSupports );
Potential Solution: We can create a separate file with all the
registerBlockType
filters required and hook it directly before the ready( init ) call