Skip to content

ucla-physicalsciences/ucla-ps-block-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

UCLA Physical Sciences Block Types

Custom plugin to manage WordPress Gutenberg blocks.

How to use

In ucla-ps-block-types.js unregister block slugs to disable them from the editor.

Example

To disable unsupported blocks...

If block slug is core/columns then add unregisterBlockType

wp.blocks.unregisterBlockType( 'core/columns' );
wp.blocks.unregisterBlockType( 'core/latest-comments' );

To find out name of a block slug, view source and get name from data-type element.

Links

Hooks

Two hooks introduced to WordPress specifically for enqueueing block assets.

  • enqueue_block_editor_assets – This can be used to enqueue block scripts and styles in the admin editor only.
  • enqueue_block_assets – This is used to enqueue block scripts and styles in both the admin editor and frontend of the site.

For more info, view 2018 blog post by Jason YingLing

Contributors

About

Custom plugin to manage WordPress Gutenberg blocks.

Resources

Stars

Watchers

Forks

Packages

No packages published