-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconditional.php
More file actions
72 lines (57 loc) · 2.13 KB
/
conditional.php
File metadata and controls
72 lines (57 loc) · 2.13 KB
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
64
65
66
67
68
69
70
71
72
<?php
/**
* Plugin Name: Visibility Logic for Elementor
* Description: Hide or show Elementor widgets based on conditions
* Plugin URI: https://wordpress.org/plugins/visibility-logic-elementor
* Author URI: https://staxwp.com
* Author: StaxWP
* Version: 2.5.0
*
* Elementor tested up to: 3.35
* Elementor Pro tested up to: 3.35
*
* Text Domain: visibility-logic-elementor
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'STAX_VISIBILITY_VERSION', '2.5.0' );
define( 'STAX_VISIBILITY_FILE', __FILE__ );
define( 'STAX_VISIBILITY_PLUGIN_BASE', plugin_basename( STAX_VISIBILITY_FILE ) );
define( 'STAX_VISIBILITY_PATH', plugin_dir_path( STAX_VISIBILITY_FILE ) );
define( 'STAX_VISIBILITY_BASE_URL', plugins_url( '/', STAX_VISIBILITY_FILE ) );
define( 'STAX_VISIBILITY_ASSETS_URL', STAX_VISIBILITY_BASE_URL . 'assets/' );
define( 'STAX_VISIBILITY_CORE_PATH', STAX_VISIBILITY_PATH . 'core/' );
define( 'STAX_VISIBILITY_CORE_HELPERS_PATH', STAX_VISIBILITY_CORE_PATH . 'helpers/' );
define( 'STAX_VISIBILITY_CORE_SETTINGS_PATH', STAX_VISIBILITY_CORE_PATH . 'settings/' );
define( 'STAX_VISIBILITY_HOOK_PREFIX', 'stax_visibility_' );
define( 'STAX_VISIBILITY_SLUG_PREFIX', 'stax-visibility-' );
require_once __DIR__ . '/vendor/autoload.php';
require_once STAX_VISIBILITY_CORE_PATH . 'Singleton.php';
require_once STAX_VISIBILITY_CORE_PATH . 'Plugin.php';
/**
* Load textdomain.
*
* Load gettext translate for Elementor text domain.
*
* @return void
* @since 1.0.0
*/
function ecl_load_plugin_textdomain() {
load_plugin_textdomain( 'visibility-logic-elementor' );
}
add_action( 'init', 'ecl_load_plugin_textdomain', 0 );
/**
* Initialize the plugin tracker
*
* @return void
*/
function appsero_init_tracker_visibility_logic_elementor() {
if ( ! class_exists( 'Appsero\Client' ) ) {
require_once __DIR__ . '/vendor/appsero/client/src/Client.php';
}
$client = new Appsero\Client( 'd40e3204-1270-4588-b9ff-37b420fad6b8', 'Visibility Logic for Elementor', __FILE__ );
// Active insights
$client->insights()->init();
}
add_action( 'init', 'appsero_init_tracker_visibility_logic_elementor', 1 );