array( $this, 'block_render' ), ) ); } /** * Register gutenberg block output * * @param array $attributes - block attributes. * * @return string */ public function block_render( $attributes ) { if ( $this->rendering ) { return ''; } $this->rendering = true; ob_start(); $class = isset( $attributes['className'] ) ? $attributes['className'] : ''; $class .= ' ghostkit-widgetized-area'; if ( $attributes['id'] ) { echo '
'; dynamic_sidebar( $attributes['id'] ); echo '
'; } $this->rendering = false; return ob_get_clean(); } } new GhostKit_Widgetized_Area_Block();