PluginProbe
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms / 3.50.0
Tag, Category, and Taxonomy Manager – Autotagger Automatically Add Terms v3.50.0
3.54.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 All 178 releases
simple-tags / inc / dashboard.php

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

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