Skip to content

Commit

Permalink
Corrects underpin autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstandiford committed May 6, 2021
1 parent 09b04a8 commit 2cb844d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
}

// Add this loader.
add_action( 'underpin/before_setup', function ( $file ) {
add_action( 'underpin/before_setup', function ( $file, $class ) {
require_once( plugin_dir_path( __FILE__ ) . 'Blocks.php' );
require_once( plugin_dir_path( __FILE__ ) . 'Block.php' );
require_once( plugin_dir_path( __FILE__ ) . 'Block_Instance.php' );
Underpin\underpin()->get( $file )->loaders()->add( 'blocks', [
Underpin\underpin()->get( $file, $class )->loaders()->add( 'blocks', [
'registry' => 'Underpin_Blocks\Loaders\Blocks',
] );
} );
}, 10, 2 );

0 comments on commit 2cb844d

Please sign in to comment.