-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclass-addon.php
48 lines (41 loc) · 1.48 KB
/
class-addon.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
<?php
namespace WPOnion\Addon;
if ( ! defined( 'ABSPATH' ) ) {
die;
}
use WPOnion\Addon_Field;
if ( ! class_exists( '\WPOnion\Addon\Conditional_Logic' ) ) {
/**
* Class Conditional_Logic
*
* @package WPOnion\Addon\Conditional_Logic
* @author Varun Sridharan <[email protected]>
* @since 1.0
*/
class Conditional_Logic extends Addon_Field {
/**
* Conditional_Logic constructor.
*/
public function __construct() {
$this->field_type = 'conditional_logic_builder';
$this->field_args = array();
$this->field_supports = 'all';
$this->field_class_file = 'includes/class-conditional-logic-builder.php';
parent::__construct( __( 'Conditional Logic Builder' ), __FILE__, '0.1' );
require_once $this->dir( 'includes/class-helper.php' );
}
/**
* Registers Assets.
*/
public function register_assets() {
wp_register_script( 'wponion-query-builder-core', $this->url( 'assets/js/query-builder.js' ), array(
'jquery',
'wponion-core',
), $this->version );
wp_register_script( 'wponion-query-builder', $this->url( 'assets/js/addon.js' ), array( 'wponion-query-builder-core' ), $this->version );
wp_register_style( 'wponion-query-builder-core', $this->url( 'assets/css/query-builder.min.css' ), array( 'wponion-core' ), $this->version );
wp_register_style( 'wponion-query-builder', $this->url( 'assets/css/addon.css' ), array( 'wponion-query-builder-core' ), $this->version );
}
}
}
return Conditional_Logic::instance();