-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.php
More file actions
38 lines (30 loc) · 775 Bytes
/
Copy pathsample.php
File metadata and controls
38 lines (30 loc) · 775 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
<<?php
/**
* Plugin Name: My sample plugin
* Description: This is a very basic plugin
* Version:1.0
* Author: Nima
* */
function gutenberg_block_admin() {
wp_enqueue_script(
'gutenberg-notice-block-editor',
plugins_url( 'block.js', __FILE__ ),
array( 'wp-blocks', 'wp-element' )
);
wp_enqueue_style(
'gutenberg-notice-block-editor',
plugins_url( 'block.css', __FILE__ ),
array()
);
}
add_action( 'enqueue_block_editor_assets', 'gutenberg_block_admin' );
// Load assets for frontend
function gutenberg_block_frondend() {
wp_enqueue_style(
'gutenberg-notice-block-editor',
plugins_url( 'block.css', __FILE__ ),
array()
);
}
add_action( 'wp_enqueue_scripts', 'gutenberg_block_frondend' );
?>