-
Notifications
You must be signed in to change notification settings - Fork 0
/
adag-hero-slider.php
39 lines (36 loc) · 978 Bytes
/
adag-hero-slider.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
<?php
/**
* Plugin Name: Hero Slider
* Description: A great slideshow block with SplideJs.
* Requires at least: 5.8
* Requires PHP: 7.0
* Version: 1.0.0
* Author: Adson Cicilioti
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: hero-slider
*
* @package HeroSlider
*/
function adag_hero_slider_block_assets() {
wp_enqueue_script(
'splide-js',
plugins_url( '/vendor/splide.js', __FILE__ ),
array()
);
wp_enqueue_script(
'splide-js-init',
plugins_url( '/vendor/splideInit.js', __FILE__ ),
array( 'splide-js' )
);
wp_enqueue_style(
'splide-css',
plugins_url( '/vendor/splide.css', __FILE__ ),
array()
);
}
add_action( 'enqueue_block_assets', 'adag_hero_slider_block_assets' );
function adag_hero_slider_block_init() {
register_block_type( __DIR__ . '/build' );
}
add_action( 'init', 'adag_hero_slider_block_init' );