Skip to content

uclaioes/ucla-ioes-blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UCLA IoES Blocks

Custom plugin to manage WordPress blocks.

Use cases currently functional

  1. Disable unsupported blocks

To do

  1. Disable or enable blocks to custom post types

How to use

In ucla-ioes-blocks.js unregister block slugs to disable in editor.

Example

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.


Functions

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.

Links

WordPress Codex

Blog posts


Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published