Created
September 23, 2020 09:17
-
-
Save munirkamal/0d443605a3273926051c2971d5f3ff84 to your computer and use it in GitHub Desktop.
List of Core Gutenberg Blocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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