PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 1.2.20
Booking for Appointments and Events Calendar – Amelia v1.2.20
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / extensions / wpdt / functions.php
ameliabooking / extensions / wpdt Last commit date
assets 2 years ago functions.php 2 years ago promote_wpdt.php 1 year ago
functions.php
61 lines
1 <?php
2 // Exit if accessed directly
3 defined('ABSPATH') || exit;
4
5 if (! function_exists('amelia_installed_plugins_wpdt_promotion')) :
6 function amelia_installed_plugins_wpdt_promotion()
7 {
8 $plugins_to_check = array(
9 'visualizer/index.php',
10 'tablepress/tablepress.php',
11 'ninja-tables/ninja-tables.php',
12 'wp-table-builder/wp-table-builder.php',
13 'wp-table-manager/wp-table-manager.php',
14 'data-tables-generator-by-supsystic/index.php',
15 'superb-tables/superb-tables.php',
16 'tablesome/tablesome.php',
17 'tableberg/tableberg.php'
18 );
19
20 $installed_plugins = array();
21 $installed_plugins_not_active = array();
22
23 foreach ($plugins_to_check as $plugin) {
24 if (is_plugin_active($plugin)) {
25 $installed_plugins[] = $plugin;
26 }
27 if(wpAmelia_is_plugin_installed($plugin)){
28 $installed_plugins_not_active[] = $plugin;
29 }
30 }
31
32 if (!empty($installed_plugins)) {
33 if(!is_plugin_inactive('wpdatatables/wpdatatables.php') &&
34 is_plugin_inactive('wpdatatables/wpdatatables.php')) {
35 return true;
36 }
37 }
38
39 if (!empty($installed_plugins_not_active)) {
40 if(!wpAmelia_is_plugin_installed('wpdatatables/wpdatatables.php')) {
41 return true;
42 }
43 }
44
45 return false;
46 }
47
48 function wpAmelia_is_plugin_installed($plugin_path) {
49 $plugins_dir = WP_PLUGIN_DIR;
50 $plugin_file = $plugins_dir . '/' . $plugin_path;
51
52 if (file_exists($plugin_file)) {
53 return true;
54 } else {
55 return false;
56 }
57 }
58 endif;
59
60 ?>
61