Skip to content

Instantly share code, notes, and snippets.

@munirkamal
Created September 23, 2020 09:17
Show Gist options
  • Select an option

  • Save munirkamal/0d443605a3273926051c2971d5f3ff84 to your computer and use it in GitHub Desktop.

Select an option

Save munirkamal/0d443605a3273926051c2971d5f3ff84 to your computer and use it in GitHub Desktop.
List of Core Gutenberg Blocks
archives
audio
button
categories
code
column
columns
coverImage
embed
file
freeform
gallery
heading
html
image
latestComments
latestPosts
list
more
nextpage
paragraph
preformatted
pullquote
quote
reusableBlock
separator
shortcode
spacer
subhead
table
textColumns
verse
video
<?php
function lock_post_for_classic_block() {
//Define your post types to lock for classic editor block. Default CPTs are 'post', 'page'
$post_type_object = get_post_type_object( 'post' );
//Define what blocks you want to lock it for.
$post_type_object->template = array(
array( 'core/freeform'),
);
//Possible Lock Options: all, insert
$post_type_object->template_lock = 'all';
}
add_action( 'init', 'lock_post_for_classic_block' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment