Skip to content

Commit

Permalink
copy new block classes
Browse files Browse the repository at this point in the history
  • Loading branch information
petitphp committed Mar 1, 2021
1 parent ec93bd9 commit 1cf964d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Command/ScaffoldPluginCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ protected function execute( InputInterface $input, OutputInterface $output ) {
rename( $downloadPath . '/classes/Helpers.php', $installPath . 'classes/Helpers.php' );
rename( $downloadPath . '/classes/Singleton.php', $installPath . 'classes/Singleton.php' );
rename( $downloadPath . '/classes/Admin/Main.php', $installPath . 'classes/Admin/Main.php' );

// Since Boilerplate 3.2.0
if ( is_readable( $downloadPath . '/classes/Blocks.php' ) ) {
mkdir( $installPath . '/classes/Blocks/', 0755, true );
rename( $downloadPath . '/classes/Blocks.php', $installPath . 'classes/Blocks.php' );
rename( $downloadPath . '/classes/Blocks/Acf_Block.php', $installPath . 'classes/Blocks/Acf_Block.php' );
rename( $downloadPath . '/classes/Blocks/Acf_Block_Interface.php', $installPath . 'classes/Blocks/Acf_Block_Interface.php' );
rename( $downloadPath . '/classes/Blocks/Block.php', $installPath . 'classes/Blocks/Block.php' );
rename( $downloadPath . '/classes/Blocks/Block_Interface.php', $installPath . 'classes/Blocks/Block_Interface.php' );
rename( $downloadPath . '/classes/Blocks/Dynamic_Block.php', $installPath . 'classes/Blocks/Dynamic_Block.php' );
rename( $downloadPath . '/classes/Blocks/Dynamic_Block_Interface.php', $installPath . 'classes/Blocks/Dynamic_Block_Interface.php' );
}
}

foreach ( $this->available_components as $component ) {
Expand Down

0 comments on commit 1cf964d

Please sign in to comment.