-
Notifications
You must be signed in to change notification settings - Fork 2
/
tci-uet.php
106 lines (90 loc) · 2.19 KB
/
tci-uet.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* Plugin Name: TCI Ultimate Element Themes
* Description: Themecat_Info(TCI) present the TCI Ultimate Element Themes. Plugin have the unlimited elements.
* created themes.
* Plugin URI: https://demo.themecat.org/tci-ultimate-elementor-themes
* Author: Themecat_Info
* Version: 0.1
* Author URI: https://themecat.org/
* Text Domain: tci-uet
* Requires PHP: 7.0
* Requires at least: 5.0
* Tested up to: 5.2
* WC requires at least: 3.0.0
* WC tested up to: 3.7
* License: GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Domain Path: /languages/
*/
/**
* Admin notice
* Warning when the site doesn't have Elementor installed or activated.
*
* @since 0.0.5
*/
function tci_uet_admin_notice_missing_main_plugin() {
$message = sprintf(
esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'tci-uet' ),
'<strong>' . esc_html__( 'TCI Ultimate Element Themes', 'tci-uet' ) . '</strong>',
'<strong>' . esc_html__( 'Elementor', 'tci-uet' ) . '</strong>'
);
printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
}
if ( ! did_action( 'elementor/loaded' ) ) {
add_action( 'admin_notices', 'tci_uet_admin_notice_missing_main_plugin' );
return;
}
/**
* Plugin DB settings
*
* @since 0.0.5
*/
define( 'TCI_UET_SETTINGS', 'tci_uet_settings' );
/**
* Plugin options
*
* @since 0.0.5
*/
define( 'TCI_UET', 'tci_uet_uet_main_' );
/**
* Plugin Version
*
* @since 0.0.5
*/
define( 'TCI_UET_VERSION', '0.1' );
/**
* Plugin file get form directory
*
* @since 0.0.5
*/
function tci_uet_root( $dir = '' ) {
return plugin_dir_path( __FILE__ ) . $dir;
}
/**
* Plugin file get form url
*
* @since 0.0.5
*/
function tci_uet_uri( $dir = '' ) {
return plugin_dir_url( __FILE__ ) . $dir;
}
/**
* Plugin file basename
*
* @since 0.0.5
*/
function tci_uet_basename() {
return plugin_basename( __FILE__ );
}
/**
* Fire on 'plugin_loaded'
*
* @since 0.0.5
*/
function tci_uet_plugin_loaded_action() {
require tci_uet_root( 'inc/tci-uet-functions.php' );
require tci_uet_root( 'classes/class-tci-uet-init.php' );
new TCI_UET\TCI_UET_Init();
}
add_action( 'plugins_loaded', 'tci_uet_plugin_loaded_action', 0 );