Skip to content

Instantly share code, notes, and snippets.

@karks88
Last active May 23, 2025 13:34
Show Gist options
  • Select an option

  • Save karks88/a97b31609a1d45733b82ac2b80ea1cfc to your computer and use it in GitHub Desktop.

Select an option

Save karks88/a97b31609a1d45733b82ac2b80ea1cfc to your computer and use it in GitHub Desktop.
Wireframe: My Custom WordPress Block Style Variations
<?php
/**
* Plugin Name: My Custom Block Variations
* Description: Adds custom block style variations to the WordPress block editor.
* Author: Eric Karkovack
* Author URI: https://speckyboy.com/
* Version: 1.0.0
* Requires at least: 6.6
* Requires PHP: 7.4
*/
// Don't allow direct access to the plugin file.
defined('ABSPATH') || exit;
// Custom function to register block style variations.
function mcbv_register_block_styles() {
// Add block style variations here. See: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/#server-side-registration-helper
}
// Initialize the custom function.
add_action( 'init', 'mcbv_register_block_styles' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment