PluginProbe
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms / 3.44.0
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms v3.44.0
3.53.0 3.52.0 3.51.0 3.50.0 3.45.0 3.38.0 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.40.0 3.40.1 3.41.0 3.42.0 3.43.0 3.44.0 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 All 177 releases
simple-tags / inc / dashboard.php

dashboard.php in Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms 3.44.0, at inc/dashboard.php

131 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class SimpleTags_Dashboard
4 {
5
6 const MENU_SLUG = 'st_options';
7
8 // class instance
9 static $instance;
10
11 /**
12 * Constructor
13 *
14 * @return void
15 * @author Olatechpro
16 */
17 public function __construct()
18 {
19 // Admin menu
20 add_action('admin_menu', [$this, 'admin_menu']);
21 }
22
23 /** Singleton instance */
24 public static function get_instance()
25 {
26 if (!isset(self::$instance)) {
27 self::$instance = new self();
28 }
29
30 return self::$instance;
31 }
32
33 /**
34 * Add WP admin menu for Tags
35 *
36 * @return void
37 * @author Olatechpro
38 */
39 public function admin_menu()
40 {
41 $hook = add_submenu_page(
42 self::MENU_SLUG,
43 esc_html__('Dashboard', 'simple-tags'),
44 esc_html__('Dashboard', 'simple-tags'),
45 'simple_tags',
46 'st_dashboard',
47 [
48 $this,
49 'page_manage_dashboard',
50 ]
51 );
52 }
53
54 /**
55 * Method for build the page HTML manage tags
56 *
57 * @return void
58 * @author Ojopaul
59 */
60 public function page_manage_dashboard()
61 {
62 // Default order
63 if (!isset($_GET['order'])) {
64 $_GET['order'] = 'name-asc';
65 }
66
67 // Display message
68 settings_errors(__CLASS__);
69
70 $show_welcome = isset($_GET['welcome']) ? true : false;
71 ?>
72 <?php if ($show_welcome) : ?>
73 <div class="taxopress-welcome-banner">
74 <div class="banner-wrap">
75 <div class="banner-inner">
76 <a>
77 <img src="<?php echo esc_url(STAGS_URL.'/assets/images/tp-email-logo.png'); ?>" alt="TaxoPress Logo"/>
78 </a>
79 </div>
80 </div>
81 </div>
82
83 <div class="taxopress-welcome-content">
84 <div class="content-wrap">
85 <div class="taxopress-welcome">
86 <div class="welcome-panel-content">
87 <h2><?php esc_html_e('Welcome to TaxoPress, the WordPress taxonomy plugin', 'simple-tags'); ?></h2>
88 </div>
89 </div>
90 </div>
91 </div>
92 <?php endif; ?>
93 <div class="taxopress-block-wrap">
94 <div class="wrap st_wrap tagcloudui st_dashboard-page admin-settings">
95 <h1 class="wp-heading-inline"><?php esc_html_e('Dashboard', 'simple-tags'); ?></h1>
96 <div class="taxopress-description">
97 <?php esc_html_e('This screen allows you to enable or disable TaxoPress features.', 'simple-tags'); ?>
98 </div>
99
100 <form id="taxopress-capabilities-dashboard-form">
101 <div class="taxopress-dashboard-settings-boxes">
102 <?php foreach (taxopress_dashboard_options() as $feature => $option) :
103 $feature_option_key = $option['option_key'];
104 ?>
105 <div class="taxopress-dashboard-settings-box">
106 <h3><?php echo esc_html($option['label']); ?></h3>
107 <div class="taxopress-dashboard-settings-description"><?php echo esc_html($option['description']); ?></div>
108 <div class="taxopress-dashboard-settings-control">
109 <div class="taxopress-switch-button">
110 <label class="switch">
111 <input type="checkbox" value="1" data-option_key="<?php echo esc_attr($feature_option_key); ?>" data-feature="<?php echo esc_attr($feature); ?>" <?php checked((int) SimpleTags_Plugin::get_option_value($feature_option_key), 1); ?> />
112 <span class="slider"></span>
113 </label>
114 </div>
115 </div>
116 </div>
117 <?php endforeach; ?>
118 </div>
119 </form>
120 </div>
121
122 <div class="taxopress-right-sidebar admin-settings-sidebar">
123 <?php do_action('taxopress_admin_after_sidebar'); ?>
124 </div>
125
126 </div>
127
128 <?php
129 }
130 }
131