forked from Automattic/gutenberg-block-styles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
30 lines (27 loc) · 778 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
<?php
/**
* Plugin Name: Gutenberg Block Styles
* Plugin URI: https://github.com/kjellr/gutenberg-block-styles/
* Description: A simple plugin to demonstrate how to add block styles to Gutenberg.
* Version: 1.0
* Author: Kjell Reigstad
*/
/**
* Enqueue Block Styles Javascript
*/
function block_styles_enqueue_javascript() {
wp_enqueue_script( 'block-styles-script',
plugins_url( 'block.js', __FILE__ ),
array( 'wp-blocks')
);
}
add_action( 'enqueue_block_editor_assets', 'block_styles_enqueue_javascript' );
/**
* Enqueue Block Styles Stylesheet
*/
function block_styles_enqueue_stylesheet() {
wp_enqueue_style( 'block-styles-stylesheet',
plugins_url( 'style.css', __FILE__ )
);
}
add_action( 'enqueue_block_assets', 'block_styles_enqueue_stylesheet' );