How to Develop With the Crosswinds Blocks Plugin

  1. Home
  2. Article
  3. How to Develop With the Crosswinds Blocks Plugin

Customizing the use of Crosswinds Blocks with your theme is fairly easy and straightforward.

Right now, the biggest thing you can do is force certain blocks, post types and taxonomies to be enabled when your theme is active. Below are the filters you can use to do just that.

Blocks

<?php
add_filter( 'crosswinds_blocks_enable_{block-slug}_block', function(){
    return true;
} );
?>

Post Types

<?php
add_filter( 'crosswinds_blocks_enable_{post-type-slug}_cpt', function(){
    return true;
} );
?>

Taxonomies

<?php
add_filter( 'crosswinds_blocks_enable_{taxonomy-slug}_taxonomy', function(){
    return true;
} );
?>

More customizations will likely be added as the plugin continues to be developed. If you have an idea for a customization that themes can do for this plugin, please add it as an issue in the repository.

Tags: