Every Wordpress Editor Block
I've been doing some Wordpress theme development recently, and I couldn't find a decent reference for the blocks that come with the default Wordpress editor. So I'll keep one here.
Wordpress Core
I'm pulling these out of the Wordpress Source
Content
core/audiocore/calendarcore/buttonscore/button– Only used insidecore/buttons/core/codecore/classiccore/covercore/separatorcore/embedcore/filecore/gallerycore/headingcore/htmlcore/imagecore/listcore/paragraphcore/preformattedcore/pullquotecore/quotecore/tablecore/versecore/videocore/youtubecore/facebookcore/instagramcore/vimeo
Layout
core/blockcore/columnscore/column– Only used insidecore/columns.core/more
Relational
core/archivescore/categoriescore/latest-commentscore/latest-postscore/media-textcore/missingcore/navigation-linkcore/navigationcore/nextpagecore/group
Disabling blocks in the Post Editor
These identifiers are useful because they let you define a limited set of blocks that will be available in the post editor from your functions.php file.
function theme_allowed_block_types($allowed_block_types){
return array(
'core/paragraph',
'core/heading',
'core/list'
# Add more identifiers here
);
}
add_filter('allowed_block_types', 'theme_allowed_block_types');In addition to this, I like to disable the default block CSS and style them myself instead. You do that by attaching a function to the wp_print_styles hook:
function remove_block_css()
{
wp_deregister_style('wp-block-library');
}
add_action('wp_print_styles', 'remove_block_css');