Allow filter for whether visibility controls are shown or not
-
From what I can tell, it’s not currently possible to explicitly enable controls for a block type. I’d like to allow Pattern (used to be called Reusable) blocks to show visibility controls, but I don’t want to enable FCM for every block in doing so.
It seems that you can explicitly disable controls by using the
'blockVisibility.globallyRestrictedBlockType'
filter. But there isn’t currently a filter to do the opposite (without enabling FCM and then manually toggling off everything you don’t want, which can be error-prone and tedious).I looked at adding my own filter to add support to the block, but there is no way to access the default attributes variable from outside the JS plugin module itself (
import { blockVisibilityProps } from './attributes';
) (https://github.com/ndiego/block-visibility/blob/12cd9fb4a40f32ce1390d88a4519cf5667d5c424/src/editor/index.js#L68).
- The topic ‘Allow filter for whether visibility controls are shown or not’ is closed to new replies.