array( $this, 'render_css' ), ) ); } /** * Builds CSS for block. * * @param array $attributes the blocks attributes. * @param Kadence_Blocks_CSS $css the css class for blocks. * @param string $unique_id the blocks attr ID. * @param string $unique_style_id the blocks alternate ID for queries. */ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) { $css->set_style_id( 'kb-' . $this->block_name . $unique_style_id ); $css->set_selector( '.wp-block-kadence-header-desktop' . $unique_id ); $css->add_property( 'display', 'block' ); $css->set_media_state( 'tablet' ); $css->add_property( 'display', 'none'); return $css->css_output(); } /** * The innerblocks are stored on the $content variable. We just wrap with our data, if needed * * @param array $attributes The block attributes. * * @return string Returns the block output. */ public function build_html( $attributes, $unique_id, $content, $block_instance ) { $html = ''; $classes = array( 'wp-block-kadence-header-section', 'wp-block-kadence-header-section' . esc_attr( $unique_id ), ); $html .= '
'; $html .= $content; $html .= '
'; return $html; } } Kadence_Blocks_Header_Section_Block::get_instance();