-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.php
40 lines (36 loc) · 841 Bytes
/
index.php
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
40
<?php
/**
* Plugin Name: Gutenberg Block Styles
* Plugin URI: https://github.com/Automattic/gutenberg-block-styles/
* Description: A simple plugin to demonstrate how to add block styles to Gutenberg.
* Version: 1.1
* Author: Automattic
*/
/**
* Register Custom Block Styles
*/
if ( function_exists( 'register_block_style' ) ) {
function block_styles_register_block_styles() {
/**
* Register stylesheet
*/
wp_register_style(
'block-styles-stylesheet',
plugins_url( 'style.css', __FILE__ ),
array(),
'1.1'
);
/**
* Register block style
*/
register_block_style(
'core/paragraph',
array(
'name' => 'blue-paragraph',
'label' => 'Blue Paragraph',
'style_handle' => 'block-styles-stylesheet',
)
);
}
add_action( 'init', 'block_styles_register_block_styles' );
}