PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.5.0
Spider Elements – Premium Elementor Widgets & Addons Library v1.5.0
trunk 1.0.0 1.1.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.7.0 1.8.0 1.9.0
spider-elements / includes / Admin / Dashboard.php
spider-elements / includes / Admin Last commit date
dashboard 1 year ago extension 1 year ago Assets.php 1 year ago Dashboard.php 1 year ago Module_Settings.php 1 year ago Plugin_Installer.php 1 year ago
Dashboard.php
111 lines
1 <?php
2 namespace SPEL\includes\Admin;
3
4 // Exit if accessed directly
5 if (!defined('ABSPATH')) {
6 exit;
7 }
8
9 /**
10 * Class Admin_Settings
11 * @package spiderElements\includes\Admin
12 */
13 class Dashboard {
14
15 const PAGE_ID = 'spider_elements_settings';
16
17 public function __construct() {
18
19 add_action( 'admin_menu', [ $this, 'add_menu_page' ] );
20
21 }
22
23
24 /**
25 * @return void
26 * Add menu page to the WordPress admin dashboard.
27 */
28 public function add_menu_page(): void
29 {
30
31 add_menu_page(
32 esc_html__( 'Spider Elements', 'spider-elements' ),
33 esc_html__( 'Spider Elements', 'spider-elements' ),
34 'manage_options',
35 'spider_elements_settings',
36 [ $this, 'render_plugin_page' ],
37 $this->icon(),
38 30
39 );
40 }
41
42
43 /**
44 * @return void
45 * Render the content of the menu page.
46 * This is where you would add your custom HTML
47 */
48 public function render_plugin_page(): void
49 {
50
51 echo '<form action="" method="post" id="spel_settings" name="spel_settings" class="wrapper spel_dashboard">';
52
53 //Sidebar's menu
54 echo '<div class="sidebar_navigation">';
55
56 if ( file_exists(require_once __DIR__ . '/dashboard/sidebar.php') ) {
57 require_once __DIR__ . '/dashboard/sidebar.php';
58 }
59
60 echo '</div>'; //End of sidebar menu
61
62
63 // Tab contents
64 echo '<div class="tab_contents">';
65
66 if ( file_exists(require_once __DIR__ . '/dashboard/welcome.php') ) {
67 require_once __DIR__ . '/dashboard/welcome.php';
68 }
69
70 if ( file_exists(require_once __DIR__ . '/dashboard/elements.php') ) {
71 require_once __DIR__ . '/dashboard/elements.php';
72 }
73
74 if ( file_exists(require_once __DIR__ . '/dashboard/features.php') ) {
75 require_once __DIR__ . '/dashboard/features.php';
76 }
77
78 /*if ( file_exists(require_once __DIR__ . '/dashboard/api-settings.php') ) {
79 require_once __DIR__ . '/dashboard/api-settings.php';
80 }*/
81
82 if ( file_exists(require_once __DIR__ . '/dashboard/integration.php') ) {
83 require_once __DIR__ . '/dashboard/integration.php';
84 }
85
86 /*if ( file_exists(require_once __DIR__ . '/dashboard/go-premium.php') ) {
87 require_once __DIR__ . '/dashboard/go-premium.php';
88 }*/
89
90 if ( file_exists(require_once __DIR__ . '/dashboard/popup-pro.php') ) {
91 require_once __DIR__ . '/dashboard/popup-pro.php';
92 }
93
94 echo '</div>'; //End of tab contents
95
96 echo '</form>'; //End of wrapper
97
98 }
99
100
101 /**
102 * @return string
103 * Return the base64 encoded SVG icon.
104 */
105 public function icon(): string
106 {
107 return 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODMiIHZpZXdCb3g9IjAgMCA4NiA4MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzRfMjExMikiPgo8cGF0aCBkPSJNODYgMTkuNjE0MlYxNS45OTc2VjBINzAuMjI4M0gxNS43NzE3QzcuMDYwNTcgMCAwIDcuMTYxNzEgMCAxNS45OTc2SDc2LjAxMjJDNzguNzMxNCAxOC4yNTg0IDgyLjIwODcgMTkuNjE0MiA4NiAxOS42MTQyWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzRfMjExMikiLz4KPHBhdGggZD0iTTAgNjMuMzg1N1Y2Ny4wMDI0VjgzSDE1Ljc3MTdINzAuMjI4M0M3OC45Mzk0IDgzIDg2IDc1LjgzODIgODYgNjcuMDA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