-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample-block-style.php
More file actions
39 lines (36 loc) · 863 Bytes
/
example-block-style.php
File metadata and controls
39 lines (36 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* Plugin Name: Example Block Style
* Description: Example block style tutorial.
* Requires at least: 6.1
* Requires PHP: 7.0
* Version: 0.1.0
* Author: The WordPress Contributors
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: example-block-style
*
* @package create-block
*/
/**
* Register our custom block style
*
* @return void
*/
function wp_dev_register_block_style() {
wp_enqueue_block_style(
'core/list',
array(
'handle' => 'example-block-style',
'src' => plugins_url( 'example-block-style.css', __FILE__ ),
)
);
register_block_style(
'core/list',
array(
'name' => 'check', // .is-style-check
'label' => 'Check',
)
);
}
add_action( 'init', 'wp_dev_register_block_style' );