-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathelementor-addon-widgets.php
63 lines (49 loc) · 1.64 KB
/
elementor-addon-widgets.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
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/*
* Plugin Name: Elementor Addon Widgets
* Plugin URI: http://www.wpdevhq.com/plugins/elementor-addon-widgets
* Description: A helper plugin for users of Elementor Pagebuilder.
* Version: 1.0.2
* Author: WPDevHQ
* Author URI: http://www.wpdevhq.com/
* Requires at least: 4.4
* Tested up to: 4.6.1
*/
/* Do not access this file directly */
if ( ! defined( 'WPINC' ) ) { die; }
/* Constants
------------------------------------------ */
/* Set plugin version constant. */
define( 'EA_VERSION', '1.0.0' );
/* Set constant path to the plugin directory. */
define( 'EA_PATH', trailingslashit( plugin_dir_path(__FILE__) ) );
/* Set the constant path to the plugin directory URI. */
define( 'EA_URI', trailingslashit( plugin_dir_url( __FILE__ ) ) );
/* ElemenTemplater Class */
require_once( EA_PATH . 'eaw-class.php' );
/**
* Query WooCommerce activation
*/
if ( ! function_exists( 'is_woocommerce_activated' ) ) {
function is_woocommerce_activated() {
return class_exists( 'woocommerce' ) ? true : false;
}
}
/**
* Call a shortcode function by tag name.
*
* @since 1.0.0
*
* @param string $tag The shortcode whose function to call.
* @param array $atts The attributes to pass to the shortcode function. Optional.
* @param array $content The shortcode's content. Default is null (none).
*
* @return string|bool False on failure, the result of the shortcode on success.
*/
function eaw_do_shortcode( $tag, array $atts = array(), $content = null ) {
global $shortcode_tags;
if ( ! isset( $shortcode_tags[ $tag ] ) ) {
return false;
}
return call_user_func( $shortcode_tags[ $tag ], $atts, $content, $tag );
}