PluginProbe
WP Directory Kit / 1.4.8
WP Directory Kit v1.4.8
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
← All changes | wpdirectorykit.php +36 -32 1.2.31.4.8 View file →
@@ -14,11 +14,11 @@
14 14 *
15 15 * @wordpress-plugin
16 16 * Plugin Name: WP Directory Kit
17 17 * Plugin URI: https://wpdirectorykit.com/plugins/wpdirectorykit.html
18 - * Description: Build your Directory portal, demos for Real Estate Agency and Car Dealership included
19 - * Version: 1.2.3
20 - * Requires PHP: 5.6
18 + * Description: Build your Directory portal, demos for Real Estate Agencies and Car Dealership included
19 + * Version: 1.4.8
20 + * Requires PHP: 7.0
21 21 * Author: wpdirectorykit.com
22 22 * Author URI: https://wpdirectorykit.com
23 23 * License: GPL-2.0+
24 24 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@@ -24,16 +24,18 @@
24 24 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
25 25 * Text Domain: wpdirectorykit
26 26 * Domain Path: /languages
27 27 *
28 - * Elementor tested up to: 3.12.1
29 - * Elementor Pro tested up to: 3.13.1
28 + * Elementor tested up to: 3.33.1
29 + * Elementor Pro tested up to: 3.23.2
30 30 *
31 + * Copyright (C) SWIT Sandi Winter IT.
32 + *
31 33 */
32 34
33 35 // If this file is called directly, abort.
34 -if ( ! defined( 'WPINC' ) ) {
35 - die;
36 +if (! defined('WPINC')) {
37 + die;
36 38 }
37 39
38 40 /**
39 41 * Currently plugin version.
@@ -39,20 +41,21 @@
39 41 * Currently plugin version.
40 42 * Start at version 1.0.0 and use SemVer - https://semver.org
41 43 * Rename this for your plugin and update it as you release new versions.
42 44 */
43 -define( 'WPDIRECTORYKIT_VERSION', '1.2.3' );
44 -define( 'WPDIRECTORYKIT_NAME', 'wdk' );
45 -define( 'WPDIRECTORYKIT_PATH', plugin_dir_path( __FILE__ ) );
46 -define( 'WPDIRECTORYKIT_URL', plugin_dir_url( __FILE__ ) );
45 +define('WPDIRECTORYKIT_VERSION', '1.4.8');
46 +define('WPDIRECTORYKIT_NAME', 'wdk');
47 +define('WPDIRECTORYKIT_PATH', plugin_dir_path(__FILE__));
48 +define('WPDIRECTORYKIT_URL', plugin_dir_url(__FILE__));
47 49
48 50 /**
49 51 * The code that runs during plugin activation.
50 52 * This action is documented in includes/class-wpdirectorykit-activator.php
51 53 */
52 -function activate_wpdirectorykit() {
53 - require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpdirectorykit-activator.php';
54 - Wpdirectorykit_Activator::activate();
54 +function activate_wpdirectorykit()
55 +{
56 + require_once plugin_dir_path(__FILE__) . 'includes/class-wpdirectorykit-activator.php';
57 + Wpdirectorykit_Activator::activate();
55 58 }
56 59
57 60 /**
58 61 * The code that runs during plugin deactivation.
@@ -57,25 +60,25 @@
57 60 /**
58 61 * The code that runs during plugin deactivation.
59 62 * This action is documented in includes/class-wpdirectorykit-deactivator.php
60 63 */
61 -function deactivate_wpdirectorykit() {
62 - require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpdirectorykit-deactivator.php';
63 - Wpdirectorykit_Deactivator::deactivate();
64 +function deactivate_wpdirectorykit()
65 +{
66 + require_once plugin_dir_path(__FILE__) . 'includes/class-wpdirectorykit-deactivator.php';
67 + Wpdirectorykit_Deactivator::deactivate();
64 68 }
65 69
66 -register_activation_hook( __FILE__, 'activate_wpdirectorykit' );
67 -register_deactivation_hook( __FILE__, 'deactivate_wpdirectorykit' );
70 +register_activation_hook(__FILE__, 'activate_wpdirectorykit');
71 +register_deactivation_hook(__FILE__, 'deactivate_wpdirectorykit');
68 72
69 73 /**
70 74 * The core plugin class that is used to define internationalization,
71 75 * admin-specific hooks, and public-facing site hooks.
72 76 */
73 -require plugin_dir_path( __FILE__ ) . 'includes/class-wpdirectorykit.php';
77 +require plugin_dir_path(__FILE__) . 'includes/class-wpdirectorykit.php';
74 78
75 79
76 -if(file_exists(WPDIRECTORYKIT_PATH . 'premium_functions.php') && !defined('WDK_FS_DISABLE'))
77 -{
80 +if (file_exists(WPDIRECTORYKIT_PATH . 'premium_functions.php') && !defined('WDK_FS_DISABLE')) {
78 81 require_once WPDIRECTORYKIT_PATH . 'premium_functions.php';
79 82 }
80 83
81 84 /**
@@ -86,17 +89,17 @@
86 89 * not affect the page life cycle.
87 90 *
88 91 * @since 1.0.0
89 92 */
90 -function run_wpdirectorykit() {
93 +function run_wpdirectorykit()
94 +{
91 95
92 - $plugin = new Wpdirectorykit();
93 - $plugin->run();
94 -
96 + $plugin = new Wpdirectorykit();
97 + $plugin->run();
95 98 }
96 99 run_wpdirectorykit();
97 100
98 -
101 +
99 102 /*
100 103 * Add admin notify
101 104 * @param (string) $key unique key of notify, prefix included related plugin
102 105 * @param (string) $text test of message
@@ -103,21 +106,22 @@
103 106 * @param (function) $callback_filter custom function should be return true if not need show
104 107 * @param (string) $class notify alert class, by default 'notice notice-error'
105 108 * @return boolen true
106 109 */
107 -function wdk_notify_admin ($key = '', $text = 'Custom Text of message', $callback_filter = '', $class = 'notice notice-error') {
108 - $key = 'wdk_notify_'.$key;
109 - $key_diss = $key.'_dissmiss';
110 +function wdk_notify_admin($key = '', $text = 'Custom Text of message', $callback_filter = '', $class = 'notice notice-error')
111 +{
112 + $key = 'wdk_notify_' . $key;
113 + $key_diss = $key . '_dissmiss';
110 114
111 115 $wdk_notinstalled_admin_notice__error = function () use ($key_diss, $text, $class, $callback_filter) {
112 116 global $wpdb;
113 117 $user_id = get_current_user_id();
114 118 if (!get_user_meta($user_id, $key_diss)) {
115 - if(!empty($callback_filter)) if($callback_filter()) return false;
119 + if (!empty($callback_filter)) if ($callback_filter()) return false;
116 120
117 121 $message = '';
118 122 $message .= $text;
119 - printf('<div class="%1$s" style="position:relative;"><p>%2$s</p><a href="?'.$key_diss.'"><button type="button" class="notice-dismiss"></button></a></div>', esc_html($class), ($message)); // WPCS: XSS ok, sanitization ok.
123 + printf('<div class="%1$s" style="position:relative;"><p>%2$s</p><a href="?' . $key_diss . '"><button type="button" class="notice-dismiss"></button></a></div>', esc_html($class), ($message)); // WPCS: XSS ok, sanitization ok.
120 124 }
121 125 };
122 126
123 127 add_action('admin_notices', function () use ($wdk_notinstalled_admin_notice__error) {