PluginProbe ʕ •ᴥ•ʔ
Spider Elements – Premium Elementor Widgets & Addons Library / 1.6.4
Spider Elements – Premium Elementor Widgets & Addons Library v1.6.4
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
98 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 *
12 * @package spiderElements\includes\Admin
13 */
14 class Dashboard {
15
16 const PAGE_ID = 'spider_elements_settings';
17
18 public function __construct() {
19 add_action( 'admin_menu', [ $this, 'add_menu_page' ] );
20 }
21
22
23 /**
24 * @return void
25 * Add menu page to the WordPress admin dashboard.
26 */
27 public function add_menu_page(): void {
28 add_menu_page(
29 esc_html__( 'Spider Elements', 'spider-elements' ),
30 esc_html__( 'Spider Elements', 'spider-elements' ),
31 'manage_options',
32 'spider_elements_settings',
33 [ $this, 'render_plugin_page' ],
34 $this->icon(),
35 30
36 );
37 }
38
39
40 /**
41 * @return void
42 * Render the content of the menu page.
43 * This is where you would add your custom HTML
44 */
45 public function render_plugin_page(): void {
46
47 echo '<form action="" method="post" id="spel_settings" name="spel_settings" class="wrapper spel_dashboard">';
48
49 //Sidebar's menu
50 echo '<div class="sidebar_navigation">';
51
52 if ( file_exists( require_once __DIR__ . '/dashboard/sidebar.php' ) ) {
53 require_once __DIR__ . '/dashboard/sidebar.php';
54 }
55
56 echo '</div>'; //End of sidebar menu
57
58
59 // Tab contents
60 echo '<div class="tab_contents">';
61
62 if ( file_exists( require_once __DIR__ . '/dashboard/welcome.php' ) ) {
63 require_once __DIR__ . '/dashboard/welcome.php';
64 }
65
66 if ( file_exists( require_once __DIR__ . '/dashboard/elements.php' ) ) {
67 require_once __DIR__ . '/dashboard/elements.php';
68 }
69
70 if ( file_exists( require_once __DIR__ . '/dashboard/features.php' ) ) {
71 require_once __DIR__ . '/dashboard/features.php';
72 }
73
74 if ( file_exists( require_once __DIR__ . '/dashboard/integration.php' ) ) {
75 require_once __DIR__ . '/dashboard/integration.php';
76 }
77
78 if ( file_exists( require_once __DIR__ . '/dashboard/popup-pro.php' ) ) {
79 require_once __DIR__ . '/dashboard/popup-pro.php';
80 }
81
82 echo '</div>'; //End of tab contents
83
84 echo '</form>'; //End of wrapper
85
86 }
87
88
89 /**
90 * @return string
91 * Return the base64 encoded SVG icon.
92 */
93 public function icon(): string {
94 return 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODYiIGhlaWdodD0iODMiIHZpZXdCb3g9IjAgMCA4NiA4MyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzRfMjExMikiPgo8cGF0aCBkPSJNODYgMTkuNjE0MlYxNS45OTc2VjBINzAuMjI4M0gxNS43NzE3QzcuMDYwNTcgMCAwIDcuMTYxNzEgMCAxNS45OTc2SDc2LjAxMjJDNzguNzMxNCAxOC4yNTg0IDgyLjIwODcgMTkuNjE0MiA4NiAxOS42MTQyWiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzRfMjExMikiLz4KPHBhdGggZD0iTTAgNjMuMzg1N1Y2Ny4wMDI0VjgzSDE1Ljc3MTdINzAuMjI4M0M3OC45Mzk0IDgzIDg2IDc1LjgzODIgODYgNjcuMDAyNEg5Ljk4Nzc4QzcuMjY4NjUgNjQuNzQxNSAzLjc5MTI3IDYzLjM4NTcgMCA2My4zODU3WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzRfMjExMikiLz4KPHBhdGggZD0iTTcwLjIyODMgMzMuN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