Every Wordpress Editor Block

I’ve been do­ing some Wordpress theme de­vel­op­ment re­cently, and I could­n’t find a de­cent ref­er­ence for the blocks that come with the de­fault Wordpress ed­i­tor. So I’ll keep one here.

Wordpress Core

I’m pulling these out of the Wordpress Source

Content

  • core/audio
  • core/calendar
  • core/buttons
  • core/button — Only used in­side core/buttons/
  • core/code
  • core/classic
  • core/cover
  • core/separator
  • core/embed
  • core/file
  • core/gallery
  • core/heading
  • core/html
  • core/image
  • core/list
  • core/paragraph
  • core/preformatted
  • core/pullquote
  • core/quote
  • core/table
  • core/verse
  • core/video
  • core/youtube
  • core/facebook
  • core/instagram
  • core/vimeo

Layout

  • core/block
  • core/columns
  • core/column — Only used in­side core/columns.
  • core/more

Relational

  • core/archives
  • core/categories
  • core/latest-comments
  • core/latest-posts
  • core/media-text
  • core/missing
  • core/navigation-link
  • core/navigation
  • core/nextpage
  • core/group

Disabling blocks in the Post Editor

These iden­ti­fiers are use­ful be­cause they let you de­fine a lim­ited set of blocks that will be avail­able in the post ed­i­tor 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 ad­di­tion to this, I like to dis­able the de­fault block CSS and style them my­self in­stead. You do that by at­tach­ing a func­tion to the wp_print_styles hook:

function remove_block_css()
{
wp_deregister_style('wp-block-library');
}
add_action('wp_print_styles', 'remove_block_css');