PluginProbe
WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress / 1.0.7
WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress v1.0.7
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 1.0.16 1.0.17 1.0.18 All 127 releases
wdesignkit / includes / user-experience / class-wdkit-onbording.php

class-wdkit-onbording.php in WDesignKit – AI Templates, Widget Builder & MCP Workflow for WordPress 1.0.7, at includes/user-experience/class-wdkit-onbording.php

142 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * It is Main File to load all Notice, Upgrade Menu and all
4 *
5 * @link https://posimyth.com/
6 * @since 1.0.6
7 *
8 * @package Wdesignkit
9 * @subpackage Wdesignkit/includes
10 * */
11
12 /**
13 * Exit if accessed directly.
14 * */
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 if ( ! class_exists( 'Wdkit_Onbording' ) ) {
20
21 /**
22 * This class used for only load All Notice Files
23 *
24 * @since 1.0.6
25 */
26 class Wdkit_Onbording {
27
28 /**
29 * Instance
30 *
31 * @since 1.0.6
32 * @var instance of the class.
33 */
34 private static $instance = null;
35
36 /**
37 * Onbording APi
38 *
39 * @since 1.0.6
40 * @var onbording_api of the class.
41 */
42 // public $onbording_api = 'https://api.posimyth.com/wp-json/tpae/v2/wdkit_store_user_data';
43
44 /**
45 * Singleton Instance Creation Method.
46 *
47 * This public static method ensures that only one instance of the class is loaded or can be loaded.
48 * It follows the Singleton design pattern to create or return the existing instance of the class.
49 *
50 * @since 1.0.6
51 * @return self Instance of the class.
52 */
53 public static function instance() {
54 if ( is_null( self::$instance ) ) {
55 self::$instance = new self();
56 }
57
58 return self::$instance;
59 }
60
61 /**
62 * Constructor
63 *
64 * Perform some compatibility checks to make sure basic requirements are meet.
65 *
66 * @since 1.0.6
67 */
68 public function __construct() {
69 $this->wdkit_deactivate_feedback();
70 }
71
72 /**
73 * Check if the Current Screen is Related to Plugin Management.
74 *
75 * @since 1.0.0
76 *
77 * @return bool True if the current screen is for managing plugins, otherwise false.
78 */
79 private function wdkit_plugins_screen() {
80 $pages = array( 'toplevel_page_wdesign-kit' );
81
82 return in_array( get_current_screen()->id, $pages, true );
83 }
84
85 /**
86 * Initialize Hooks for Deactivation Feedback Functionality.
87 *
88 * Fired by the `current_screen` action hook.
89 *
90 * @since 1.0.6
91 */
92 public function wdkit_deactivate_feedback() {
93
94 add_action(
95 'current_screen',
96 function () {
97
98 if ( ! $this->wdkit_plugins_screen() ) {
99 return;
100 }
101
102 add_action( 'admin_enqueue_scripts', array( $this, 'wdkit_onboarding_assets' ) );
103 add_action( 'admin_footer', array( $this, 'wdkit_onboarding_content_func' ) );
104 }
105 );
106 }
107
108 /**
109 * Perform some compatibility checks to make sure basic requirements are meet.
110 *
111 * @since 1.0.6
112 */
113 public function wdkit_onboarding_assets() {
114 // $nonce = wp_create_nonce( 'wdkit_onboarding_nonce' );
115
116 // wp_enqueue_style( 'wdkit-onboarding-css', WDKIT_URL . 'assets/admin/user-experience/tp-onbording.css', array(), WDKIT_VERSION );
117
118 // wp_enqueue_script( 'tp-onboarding-js', WDKIT_URL . 'assets/js/admin/tp-onbording.js', array(), WDKIT_VERSION, false );
119 // wp_localize_script(
120 // 'tp-onboarding-js',
121 // 'tp_onboarding_vars',
122 // array(
123 // 'nonce' => $nonce,
124 // )
125 // );
126
127 }
128
129 /**
130 * Perform some compatibility checks to make sure basic requirements are meet.
131 *
132 * @since 1.0.6
133 */
134 public function wdkit_onboarding_content_func() {
135
136 }
137
138 }
139
140 Wdkit_Onbording::instance();
141 }
142