PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow / 2.7.0
WDesignKit – AI Templates, Widget Builder & MCP Workflow v2.7.0
2.7.1 2.7.0 2.6.6 2.6.5 2.6.4 2.6.3 2.6.2 2.6.1 2.6.0 2.5.5 2.5.4 2.5.3 2.5.2 2.5.1 2.5.0 2.4.0 2.3.3 2.3.2 2.3.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 All 130 releases
wdesignkit / includes / admin / notices / class-wdkit-notice-main.php

class-wdkit-notice-main.php in WDesignKit – AI Templates, Widget Builder & MCP Workflow 2.7.0, at includes/admin/notices/class-wdkit-notice-main.php

113 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The file that defines the core plugin class
4 *
5 * A class definition that includes attributes and functions used across both the
6 * public-facing side of the site and the admin area.
7 *
8 * @link https://posimyth.com/
9 * @since 1.0.0
10 *
11 * @package Wdesignkit
12 * @subpackage Wdesignkit/includes
13 */
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit; // Exit if accessed directly.
17 }
18
19 if ( ! class_exists( 'Wdkit_Notice_Main' ) ) {
20
21 /**
22 * Wdkit_Notice_Main
23 *
24 * @since 1.0.0
25 */
26 class Wdkit_Notice_Main {
27
28 /**
29 * Singleton instance variable.
30 *
31 * @var instance|null The single instance of the class.
32 */
33 private static $instance;
34
35 /**
36 * Singleton instance getter method.
37 *
38 * @since 1.0.0
39 * @return self The single instance of the class.
40 */
41 public static function get_instance() {
42 if ( ! isset( self::$instance ) ) {
43 self::$instance = new self();
44 }
45
46 return self::$instance;
47 }
48
49 /**
50 * Constructor for the core functionality of the plugin.
51 *
52 * @since 1.0.0
53 */
54 public function __construct() {
55 $this->wdkit_notice_fileload();
56 $this->wdkit_unique_id();
57 }
58
59 /**
60 * Loads the file for setting plugin page notices.
61 *
62 * @since 1.0.0
63 */
64 public function wdkit_notice_fileload() {
65
66 if ( is_admin() && current_user_can( 'manage_options' ) ) {
67 /**Remove Key In Databash*/
68 include WDKIT_PATH . 'includes/admin/notices/class-wdkit-notices-remove.php';
69 include WDKIT_PATH . 'includes/admin/notices/class-wdkit-plugin-page.php';
70 }
71
72 /*
73 * The deactivation dialog is no longer loaded here. It is the shared SDK's
74 * Posimyth_Deactivation_Survey now, booted from wdesignkit.php with the config in
75 * includes/admin/notices/class-wdkit-deactivate-survey.php.
76 *
77 * Do not reintroduce a second handler on the Deactivate link — two of them stack two
78 * dialogs, which is the bug the sibling products shipped until their legacy popups were
79 * deleted.
80 */
81
82 // if ( current_user_can( 'manage_options' ) ) {
83 // if ( is_user_logged_in() ) {
84 // include WDKIT_PATH . 'includes/admin/notices/class-wdkit-review-form.php';
85 // }
86 // }
87
88 /**Add Banner For Reating after 3 day*/
89 // include WDKIT_PATH . 'includes/admin/notices/class-wdkit-rating.php';
90 }
91
92 /**
93 * Loads the file for setting plugin page notices.
94 *
95 * @since 1.0.0
96 */
97 public function wdkit_unique_id() {
98
99 if ( empty( get_option( 'wdkit_unique_id' ) ) ) {
100
101 $year = substr(date('Y'), -2);
102 $number = mt_rand() / mt_getrandmax();
103 $base36 = base_convert( substr((string)$number, 2), 10, 36 );
104 $uid = substr($base36, 0, 8);
105 $wdkit_unique_id = $year . '-' . $uid;
106
107 add_option( 'wdkit_unique_id', $wdkit_unique_id );
108 }
109 }
110 }
111
112 Wdkit_Notice_Main::get_instance();
113 }