-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
42 lines (35 loc) · 1.06 KB
/
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
41
42
<?php
/**
* Plugin Name: Contact Info Block
* Plugin URI:
* Description: This is a plugin adds a simple Contact Info block.
* Version: 0.1.0
* Author: Aleksandra Bodera
*
* @package contact-info-block
*/
defined( 'ABSPATH' ) || exit;
add_action( 'enqueue_block_editor_assets', 'contact_info_block_enqueue_block_editor_assets' );
function contact_info_block_enqueue_block_editor_assets() {
wp_enqueue_script(
'contact-info-block',
plugins_url( 'block.js', __FILE__ ),
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
);
wp_enqueue_style(
'contact-info-block-editor',
plugins_url( 'editor.css', __FILE__ ),
array( 'wp-edit-blocks' ),
filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )
);
}
add_action( 'enqueue_block_assets', 'contact_info_block_enqueue_block_assets' );
function contact_info_block_enqueue_block_assets() {
wp_enqueue_style(
'contact-info-block',
plugins_url( 'style.css', __FILE__ ),
array( 'wp-blocks' ),
filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )
);
}