'abnomize-flat-button', 'label' => __( 'Flat button', 'abnomize' ), ) ); register_block_style( 'core/button', array( 'name' => 'abnomize-button-styleround', 'label' => __( 'Round Button', 'abnomize' ), ) ); register_block_style( 'core/button', array( 'name' => 'abnomize-button-styleone', 'label' => __( 'Style 1', 'abnomize' ), 'inline_style' => '.is-style-abnomize-button-styleone { border: none; text-align: center; outline: none; overflow: hidden; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.20); }', ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/list', array( 'name' => 'abnomize-list-underline', 'label' => __( 'Underlined list items', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/list', array( 'name' => 'abnomize-list-plane', 'label' => __( 'Plane list items', 'abnomize' ), 'is_default' => false, ) ); register_block_style( 'core/heading', array( 'name' => 'abnomize-title-underline', // Unique slug for your custom style 'label' => __( 'Underlined Title', 'abnomize' ), // Display name of the style in the block editor 'inline_style' => '.is-style-abnomize-title-underline { border-bottom: 2px solid #ccc; }', ) ); register_block_style( 'core/post-title', array( 'name' => 'abnomize-title-styleone', 'label' => __( 'Style 1', 'abnomize' ), 'inline_style' => '.is-style-abnomize-title-styleone { background: #4CAF50; box-shadow: 2px 3px 1px 2px #333; }', ) ); register_block_style( 'core/social-links', array( 'name' => 'abnomize-social-square', 'label' => __( 'Square', 'abnomize' ), 'inline_style' => '.is-style-abnomize-social-square { border-radius: 0; }', ) ); register_block_style( 'core/social-links', array( 'name' => 'abnomize-social-square-fixed', 'label' => __( 'Square Blocks', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/image', array( 'name' => 'abnomize-image-styleone', 'label' => __( '3d Effect', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/image', array( 'name' => 'abnomize-image-styletwo', 'label' => __( 'Golden Shadow', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/gallery', array( 'name' => 'abnomize-gallery-styleone', 'label' => __( 'Style 1', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/gallery', array( 'name' => 'abnomize-gallery-styletwo', 'label' => __( 'Style 2', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/group', array( 'name' => 'abnomize-box-shadow', 'label' => __( 'Box shadow', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/group', array( 'name' => 'abnomize-box-shadowone', 'label' => __( 'Shadow 1', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/column', array( 'name' => 'abnomize-box-shadow', 'label' => __( 'Box shadow', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/column', array( 'name' => 'abnomize-box-shadowone', 'label' => __( 'Shadow 1', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/columns', array( 'name' => 'abnomize-box-shadow', 'label' => __( 'Box shadow', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/columns', array( 'name' => 'abnomize-box-shadowone', 'label' => __( 'Shadow 1', 'abnomize' ), ) ); register_block_style( // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_style 'core/details', array( 'name' => 'abnomize-plus', 'label' => __( 'Plus & minus', 'abnomize' ), ) ); } add_action( 'init', 'abnomize_register_block_styles' ); /** * This is an example of how to unregister a core block style. * * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-styles/ * @see https://github.com/WordPress/gutenberg/pull/37580 * * @since 1.0.0 * * @return void */ function abnomize_unregister_block_style() { wp_enqueue_script( 'abnomize-unregister', get_stylesheet_directory_uri() . '/assets/js/unregister.js', array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), GRABBER_VERSION, true ); wp_enqueue_script( 'abnomize-unregister', get_stylesheet_directory_uri() . '/assets/js/unregister.js', array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), GRABBER_VERSION, true ); wp_enqueue_script( 'abnomize-backend', get_stylesheet_directory_uri() . '/assets/js/backend.js', array(), // Dependencies GRABBER_VERSION, true ); } add_action( 'enqueue_block_editor_assets', 'abnomize_unregister_block_style' );