forked from ssovit/acf-sliders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
acf-sliders.php
44 lines (38 loc) · 960 Bytes
/
acf-sliders.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
<?php
/*
Plugin Name: Advanced Custom Fields: Sliders Field
Plugin URI: http://wppress.net/acf-slider-fields
Description: Support for some premium and Free sliders for Advanced Custom Fields
Version: 1.1
Author: WPPress.net
Author URI: http://wppress.net
*/
if (!defined('ABSPATH')) {
/* Prevent Direct Access */
die(-1);
}
class WPPress_ACF_WPPress_Sliders
{
function __construct() {
add_action('acf/register_fields', array(&$this,
'register_fields'
));
/* For ACF Pro 5+ */
add_action('acf/include_fields', array(&$this,
'register_fields'
));
}
function register_fields() {
include_once (dirname(__FILE__) . '/slider.class.php');
if (class_exists('LS_Sliders')) {
include_once ('field-layerslider.php');
}
if (class_exists('RevSlider')) {
include_once ('field-revslider.php');
}
if (class_exists('NewRoyalSliderMain')) {
include_once ('field-royal-slider.php');
}
}
}
new WPPress_ACF_WPPress_Sliders();