Skip to content

Commit

Permalink
Streamline names in JS file
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Sep 6, 2023
1 parent c3622d6 commit ca5331b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/block-editor/src/hooks/block-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { store as blockEditorStore } from '../store';

const EMPTY_OBJECT = {};

function BlocksHooksControl( props ) {
function BlockHooksControl( props ) {
const blockTypes = useSelect(
( select ) => select( blocksStore ).getBlockTypes(),
[]
Expand Down Expand Up @@ -235,25 +235,25 @@ function BlocksHooksControl( props ) {
);
}

export const withHookedBlocks = createHigherOrderComponent( ( BlockEdit ) => {
export const withBlockHooks = createHigherOrderComponent( ( BlockEdit ) => {
return ( props ) => {
const blockEdit = <BlockEdit key="edit" { ...props } />;
return (
<>
{ blockEdit }
<BlocksHooksControl
<BlockHooksControl
blockName={ props.name }
clientId={ props.clientId }
/>
</>
);
};
}, 'withHookedBlocks' );
}, 'withBlockHooks' );

if ( window?.__experimentalBlockHooks ) {
addFilter(
'editor.BlockEdit',
'core/hooked-blocks/with-inspector-control',
withHookedBlocks
'core/block-hooks/with-inspector-control',
withBlockHooks
);
}

0 comments on commit ca5331b

Please sign in to comment.