Basic block structure and checkbox import

[MAILPOET-3920]
This commit is contained in:
Mike Jolley
2021-11-02 14:01:20 +00:00
committed by Veljko V
parent 78e0ac4d4a
commit 53d3fb9c1e
13 changed files with 196 additions and 12 deletions

View File

@@ -17,5 +17,14 @@ class NewsletterBlock {
public function init() {
$this->wp->registerBlockType( Env::$assetsPath . '/js/src/newsletter_block' );
$this->wp->addFilter(
'__experimental_woocommerce_blocks_add_data_attributes_to_block',
[$this, 'addDataAttributesToBlock']
);
}
public function addDataAttributesToBlock( array $blocks ) {
$blocks[] = 'mailpoet/newsletter-block';
return $blocks;
}
}