-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
32 lines (27 loc) · 952 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
<?php
/**
* Plugin Name: Four Corners Project WP Block
* Plugin URI:
* Description:
* Version: 0.3.1
* Author: Four Corners Project, Corey Tegeler
*
* @package four-corners-project-wp-block
*/
defined( 'ABSPATH' ) || exit;
//REGISTER BLOCK
function fourcorners_register_block() {
register_block_type( dirname( __FILE__ ) . '/block.json' );
}
add_action( 'init', 'fourcorners_register_block' );
//ENQUEUE LIBRARY FILES
function fourcorners_enqueue_library_files() {
wp_enqueue_script( 'fourcorners_js', plugin_dir_url( __FILE__ ) . 'assets/fourcorners.min.js', array(), '0.3.1' );
wp_enqueue_script( 'fourcorners_block_js', plugin_dir_url( __FILE__ ) . 'build/plugin.js', array(), '0.3.1' );
}
add_action( 'wp_enqueue_scripts', 'fourcorners_enqueue_library_files' );
//ADD INLINE CSS
function fourcorners_add_inline_css() {
echo '<style>.fc-embed img {width:100%}</style>';
}
add_action( 'wp_head', 'fourcorners_add_inline_css' );