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 / white_label / class-wdkit-white-label.php

class-wdkit-white-label.php in WDesignKit – AI Templates, Widget Builder & MCP Workflow 2.7.0, at includes/admin/white_label/class-wdkit-white-label.php

81 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The file store Database Default Entry
4 *
5 * @link https://posimyth.com/
6 * @since 1.1.7
7 *
8 * @package Wdesignkit
9 */
10
11 /**Exit if accessed directly.*/
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 if ( ! class_exists( 'Wdkit_White_Label' ) ) {
17
18 /**
19 * Wdkit_White_Label
20 *
21 * @since 1.1.7
22 */
23 class Wdkit_White_Label {
24
25 /**
26 * Member Variable
27 *
28 * @var instance
29 */
30 private static $instance;
31
32 /**
33 * Initiator
34 */
35 public static function get_instance() {
36 if ( ! isset( self::$instance ) ) {
37 self::$instance = new self();
38 }
39
40 return self::$instance;
41 }
42
43 /**
44 * Define the core functionality of the plugin.
45 *
46 * @since 1.1.7
47 */
48 public function __construct() {
49 add_filter( 'all_plugins', array( $this, 'wdkit_white_label_update_free' ) );
50 }
51
52 /**
53 * White Label Plugin Page
54 *
55 * @since 1.1.7
56 *
57 * @param array $all_plugins The array containing all plugin data.
58 */
59 public function wdkit_white_label_update_free( $all_plugins ) {
60 $label_options = get_option( 'wkit_white_label' );
61 $plugin_name = ! empty( $label_options['plugin_name'] ) ? $label_options['plugin_name'] : '';
62 $plugin_desc = ! empty( $label_options['plugin_desc'] ) ? $label_options['plugin_desc'] : '';
63 $plugin_logo = ! empty( $label_options['plugin_logo'] ) ? $label_options['plugin_logo'] : '';
64 $developer_name = ! empty( $label_options['developer_name'] ) ? $label_options['developer_name'] : '';
65 $website_url = ! empty( $label_options['website_url'] ) ? $label_options['website_url'] : '';
66
67 if ( ! empty( $all_plugins[ WDKIT_PBNAME ] ) && is_array( $all_plugins[ WDKIT_PBNAME ] ) ) {
68 $all_plugins[ WDKIT_PBNAME ]['Name'] = ! empty( $plugin_name ) ? $plugin_name : $all_plugins[ WDKIT_PBNAME ]['Name'];
69 $all_plugins[ WDKIT_PBNAME ]['Description'] = ! empty( $plugin_desc ) ? $plugin_desc : $all_plugins[ WDKIT_PBNAME ]['Description'];
70 $all_plugins[ WDKIT_PBNAME ]['AuthorURI'] = ! empty( $website_url ) ? $website_url : $all_plugins[ WDKIT_PBNAME ]['AuthorURI'];
71 $all_plugins[ WDKIT_PBNAME ]['Author'] = ! empty( $developer_name ) ? $developer_name : $all_plugins[ WDKIT_PBNAME ]['Author'];
72 $all_plugins[ WDKIT_PBNAME ]['AuthorName'] = ! empty( $developer_name ) ? $developer_name : $all_plugins[ WDKIT_PBNAME ]['AuthorName'];
73
74 return $all_plugins;
75 }
76 }
77 }
78
79 Wdkit_White_Label::get_instance();
80 }
81