Crashes unsupported blocks
-
So your plugin was crashing some buddypress blocks when rendered in the backend as the attribute was not recognised by the rest api, I manged to get them working by doing this:
//allow users to override visibility for members blocks
add_filter(‘bp_members_register_blocks’, array($this,’allow_visibility_controls’), 10, 1);public function allow_visibility_controls($args){ foreach ( $args as $key => $value ) { $args[$key]['attributes']['contentVisibilityRules'] = 1; $args[$key]['attributes']['contentVisibility'] = 1; } return $args; }
You porobablky have a much better solution though which you can add to your plugin.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Crashes unsupported blocks’ is closed to new replies.