-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
50 lines (40 loc) · 1.02 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
43
44
45
46
47
48
49
50
<?php
/**
* Plugin Name:VRView Block
* Plugin URI:
* Description: VRView Block plugin
* Version: 0.1.0
* Author: jshwlkr
*
* @package vrview-block
*/
defined( 'ABSPATH' ) || exit;
add_action( 'enqueue_block_editor_assets', 'vrview_block_enqueue_block_editor_assets' );
function vrview_block_enqueue_block_editor_assets() {
wp_enqueue_script(
'google_vrview',
plugins_url( 'build/vrview.min.js', __FILE__ )
);
wp_enqueue_script(
'google_vrview_init',
plugins_url( 'build/init.js', __FILE__ )
);
wp_enqueue_script(
'vrview_block',
plugins_url( 'block.js', __FILE__ ),
array( 'wp-blocks', 'wp-i18n', 'wp-element' ),
filemtime( plugin_dir_path( __FILE__ ) . 'block.js' )
);
}
add_action( 'enqueue_block_assets', 'vrview_block_enqueue_block_assets' );
function vrview_block_enqueue_block_assets() {
wp_enqueue_script(
'google_vrview',
plugins_url( 'build/vrview.min.js', __FILE__ )
);
wp_enqueue_script(
'google_vrview_init',
plugins_url( 'build/init.js', __FILE__ ),
array('google_vrview')
);
}