Skip to content

Commit

Permalink
Remove hidden block types
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed May 18, 2021
1 parent 18b695a commit 4276707
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 4 additions & 0 deletions packages/edit-widgets/src/components/more-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export default function MoreMenu() {
>
{ __( 'Keyboard shortcuts' ) }
</MenuItem>
<FeatureToggle
feature="welcomeGuide"
label={ __( 'Welcome Guide' ) }
/>
<MenuItem
role="menuitem"
icon={ external }
Expand Down
1 change: 0 additions & 1 deletion packages/edit-widgets/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export const PREFERENCES_DEFAULTS = {
fixedToolbar: false,
welcomeGuide: true,
},
hiddenBlockTypes: [],
};
13 changes: 1 addition & 12 deletions packages/edit-widgets/src/store/reducer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { flow, union, without } from 'lodash';
import { flow } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -85,17 +85,6 @@ export const preferences = flow( [
};
}

return state;
},
hiddenBlockTypes( state, action ) {
switch ( action.type ) {
case 'SHOW_BLOCK_TYPES':
return without( state, ...action.blockNames );

case 'HIDE_BLOCK_TYPES':
return union( state, action.blockNames );
}

return state;
},
} );
Expand Down

0 comments on commit 4276707

Please sign in to comment.