Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Move addFilter back to index file
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstonphilip committed May 15, 2023
1 parent 9ae0b8b commit 83b11c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { __ } from '@wordpress/i18n';
import { addFilter } from '@wordpress/hooks';
import PatternEdit from './PatternEdit';

addFilter(
'blocks.registerBlockType',
'pattern-manager/registerPatternBlock',
registerPatternBlock
);

export default function registerPatternBlock(
settings: Record< string, unknown >,
name: string
Expand Down
7 changes: 6 additions & 1 deletion wp-modules/editor/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import PatternManagerMetaControls from './components/PatternManagerMetaControls'
import changeWords from './utils/changeWords';
import preventTransform from './utils/preventTransform';
import receiveActiveTheme from './utils/receiveActiveTheme';
import './blocks/pattern-block/registerPatternBlock';
import registerPatternBlock from './blocks/pattern-block/registerPatternBlock';

registerPlugin( 'pattern-manager-postmeta-for-patterns', {
icon: null,
Expand All @@ -25,6 +25,11 @@ addFilter(
'pattern-manager/preventTransform',
preventTransform
);
addFilter(
'blocks.registerBlockType',
'pattern-manager/registerPatternBlock',
registerPatternBlock
);
addAction(
'heartbeat.tick',
'pattern-manager/checkActiveTheme',
Expand Down

0 comments on commit 83b11c6

Please sign in to comment.