Make WordPress Core


Ignore:
Timestamp:
06/08/2021 08:36:36 PM (3 years ago)
Author:
ryelle
Message:

Twenty Thirteen: Add "No Shadow" style to button block.

This creates a new block style without a shadow, and fixes colors on outline buttons.

Props melchoyce, kjellr, scruffian.
Fixes #51223.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r51012 r51110  
    836836    }
    837837endif;
     838
     839/**
     840 * Register Custom Block Styles
     841 *
     842 * @since Twenty Thirteen 3.4
     843 */
     844if ( function_exists( 'register_block_style' ) ) {
     845    function twentythirteen_register_block_styles() {
     846
     847        /**
     848         * Register block style
     849         */
     850        register_block_style(
     851            'core/button',
     852            array(
     853                'name'         => 'no-shadow',
     854                'label'        => __( 'No Shadow', 'twentythirteen' ),
     855                'style_handle' => 'no-shadow',
     856            )
     857        );
     858    }
     859    add_action( 'init', 'twentythirteen_register_block_styles' );
     860}
Note: See TracChangeset for help on using the changeset viewer.