-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcornerstone-image-slider.php
32 lines (24 loc) · 1.13 KB
/
cornerstone-image-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
<?php
/*
Plugin Name: Cornerstone: Image Slideshow
Description: Displays an image slider with overlayed text.
Author: Justin Tucker (Certain Strings)
Author URI: http://certainstrings.com
Version: 0.1.0
*/
define( 'CS_IMAGESLIDER_PATH', plugin_dir_path( __FILE__ ) );
define( 'CS_IMAGESLIDER_URL', plugin_dir_url( __FILE__ ) );
add_action( 'wp_enqueue_scripts', 'cs_imageslider_enqueue' );
add_action( 'cornerstone_register_elements', 'cs_imageslider_register_elements' );
add_filter( 'cornerstone_icon_map', 'cs_imageslider_icon_map' );
function cs_imageslider_register_elements() {
cornerstone_register_element( 'CS_Image_Slider', 'cs-image-slider', CS_IMAGESLIDER_PATH . 'includes/cs-image-slider' );
cornerstone_register_element( 'CS_Image_Slider_Item', 'cs-image-slider-item', CS_IMAGESLIDER_PATH . 'includes/cs-image-slider-item' );
}
function cs_imageslider_enqueue() {
wp_enqueue_style( 'cs_imageslider-styles', CS_IMAGESLIDER_URL . '/assets/styles/cs-imageslider.css', array(), '0.1.0' );
}
function cs_imageslider_icon_map( $icon_map ) {
$icon_map['cs-imageslider'] = CS_IMAGESLIDER_URL . '/assets/svg/icons.svg';
return $icon_map;
}