Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Add init method to blocks class.
Browse files Browse the repository at this point in the history
  • Loading branch information
miina committed Apr 11, 2018
1 parent f9d9361 commit 7f23e78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions includes/class-amp-travel-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
class AMP_Travel_Blocks {

/**
* AMP_Travel_Blocks constructor.
* Init Travel Blocks.
*/
public function __construct() {
public function init() {
if ( function_exists( 'gutenberg_init' ) ) {
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_scripts' ) );
add_filter( 'the_content', array( $this, 'filter_the_content_amp_atts' ), 10, 1 );
Expand Down
3 changes: 2 additions & 1 deletion includes/class-amp-travel-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ protected function __construct() {
protected function instantiate_classes() {

// Init blocks.
new AMP_Travel_Blocks();
$travel_blocks = new AMP_Travel_Blocks();
$travel_blocks->init();
}

/**
Expand Down

0 comments on commit 7f23e78

Please sign in to comment.