PluginProbe
Catch Web Tools / trunk
Catch Web Tools vtrunk
trunk 0.1 0.2 0.3 0.4 1.0 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.6 1.7 1.8 1.8.1 1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 All 58 releases
catch-web-tools / admin / modules / dashboard.php

dashboard.php in Catch Web Tools trunk, at admin/modules/dashboard.php

473 lines 18.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly
4 if (! defined('ABSPATH')) exit;
5
6 /**
7 * @package Admin
8 * @sub-package Admin CatchIDs Display
9 */
10 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template partial included within class method scope; variables are local, not global.
11 ?>
12 <?php include('header.php'); ?>
13
14 <div id="catch-web-tools" aria-label="Main Content">
15 <div class="content-wrapper">
16 <div class="header">
17 <h3><?php esc_html_e('Dashboard', 'catch-web-tools'); ?></h3>
18 </div> <!-- .header -->
19 <div class="content">
20
21 <div class="module-container">
22 <div class="module-wrap">
23 <div id="module-webmaster-tools" class="catch-modules short-desc">
24
25
26 <div class="module-header">
27 <h3><?php esc_html_e('Webmaster Tools', 'catch-web-tools'); ?></h3>
28 </div> <!-- .module-header -->
29
30 <div class="module-content">
31 <p>
32 <?php esc_html_e('Webmaster Tools gives you an option to add in the Site Verfication Code and Header and Footer Script required to manage your site.', 'catch-web-tools'); ?>
33 </p>
34 <div class="catch-actions">
35 <form method="post" action="options.php">
36 <?php
37 settings_fields('webmaster-tools-group');
38
39 $settings = catchwebtools_get_options('catchwebtools_webmaster');
40
41 if (! empty($settings['status']) && $settings['status']) {
42 echo '<input type="hidden" value="0" name="catchwebtools_webmaster[status]"/>';
43
44 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
45 } else {
46 echo '<input type="hidden" value="1" name="catchwebtools_webmaster[status]"/>';
47
48 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
49 }
50 ?>
51
52 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-webmasters')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
53 </form>
54 </div>
55 </div> <!-- .module-content -->
56 </div><!-- #module-webmaster-tools -->
57 </div><!-- .module-wrap -->
58
59 <?php
60 /**
61 * Do not show Custom CSS option from WordPress 4.7 onwards
62 */
63 if (! function_exists('wp_update_custom_css_post')) {
64 ?>
65
66 <div class="module-wrap">
67
68 <div id="module-customcss" class="catch-modules short-desc">
69
70 <div class="module-header">
71 <h3><?php esc_html_e('Custom CSS', 'catch-web-tools'); ?></h3>
72 </div>
73
74 <div class="module-content">
75 <p>
76 <?php esc_html_e('Custom CSS gives you an option to add in your CSS to your WordPress site without building Child Theme. You can just add your Custom CSS and save, it will show up in the frontend head section. Leave it blank if it is not needed.', 'catch-web-tools'); ?>
77 </p>
78 <div class="catch-actions">
79 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-custom-css')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
80 </div>
81 </div><!-- .module-content -->
82 </div><!-- #module-customcss -->
83 </div><!-- .module-wrap -->
84 <?php } ?>
85
86 <div class="module-wrap">
87
88 <div id="module-catchids" class="catch-modules short-desc">
89
90 <div class="module-header">
91 <h3><?php esc_html_e('Catch IDs', 'catch-web-tools'); ?></h3>
92 </div>
93
94 <div class="module-content">
95
96 <p>
97 <?php esc_html_e('Catch IDs will show Post ID, Page ID, Media ID, Links ID, Category ID, Tag ID and UserID in the respective admin section tables.', 'catch-web-tools'); ?>
98 </p>
99
100 <div class="catch-actions">
101 <?php
102 /* Disable Option if Catch IDs plugin is active */
103 if (is_plugin_active('catch-ids/catch-ids.php')) :
104 ?>
105 <p class="notice notice-warning">
106 <?php esc_html_e('This module is currently disabled since Catch IDs standalone plugin is already active on your site.', 'catch-web-tools'); ?>
107 </p>
108 <?php else : ?>
109 <form method="post" action="options.php">
110 <?php
111 settings_fields('catchids-settings-group');
112
113 $settings = catchwebtools_get_options('catchwebtools_catchids');
114
115 if (! empty($settings['status']) && $settings['status']) {
116 echo '<input type="hidden" value="0" name="catchwebtools_catchids[status]"/>';
117
118 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
119 } else {
120 echo '<input type="hidden" value="1" name="catchwebtools_catchids[status]"/>';
121
122 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
123 }
124 ?>
125 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-catch-ids')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
126 </form>
127 <?php endif; ?>
128 </div><!-- .catch-actions -->
129 </div><!-- .catch-content -->
130 </div><!-- #module-catchids -->
131 </div><!-- .module-wrap -->
132
133
134 <div class="module-wrap">
135 <div id="module-socialicons" class="catch-modules long-desc">
136
137 <div class="module-header">
138 <h3><?php esc_html_e('Social Icons', 'catch-web-tools'); ?></h3>
139 </div>
140
141 <div class="module-content">
142 <p>
143 <?php esc_html_e('Social Icons gives you an option to add in your Social Profiles.', 'catch-web-tools'); ?>
144 </p>
145 <p>
146 <?php esc_html_e('You can add Social Icons by adding in Widgets in your Sidebar or by adding in Shortcode in your Page/Post Content or by adding the function in your template files.', 'catch-web-tools'); ?>
147 </p>
148 <div class="catch-actions">
149 <form method="post" action="options.php">
150 <?php
151 settings_fields('social-icons-group');
152
153 $settings = catchwebtools_get_options('catchwebtools_social');
154
155 if (! empty($settings['status']) && $settings['status']) {
156 echo '<input type="hidden" value="0" name="catchwebtools_social[status]"/>';
157
158 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
159 } else {
160 echo '<input type="hidden" value="1" name="catchwebtools_social[status]"/>';
161
162 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
163 }
164 ?>
165
166 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-social-icons')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
167 </form>
168 </div>
169 </div>
170 </div><!-- #module-socialicons -->
171 </div><!-- .module-wrap -->
172
173 <div class="module-wrap">
174 <div id="module-opengraph" class="catch-modules long-desc">
175 <div class="module-header">
176 <h3><?php esc_html_e('Open Graph', 'catch-web-tools'); ?></h3>
177 </div>
178
179 <div class="module-content">
180 <p><?php esc_html_e('The Open Graph protocol enables your site to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.', 'catch-web-tools'); ?>
181 </p>
182 <div class="catch-actions">
183 <form method="post" action="options.php">
184 <?php
185 settings_fields('opengraph-settings-group');
186
187 $settings = catchwebtools_get_options('catchwebtools_opengraph');
188
189 if (! empty($settings['status']) && $settings['status']) {
190 echo '<input type="hidden" value="0" name="catchwebtools_opengraph[status]"/>';
191
192 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
193 } else {
194 echo '<input type="hidden" value="1" name="catchwebtools_opengraph[status]"/>';
195
196 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
197 }
198 ?>
199
200 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-opengraph')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
201 </form>
202 </div>
203 </div>
204 </div><!-- #module-opengraph -->
205 </div><!-- .module-wrap -->
206
207 <div class="module-wrap">
208 <div id="module-seo" class="catch-modules long-desc">
209 <div class="module-header">
210 <h3><?php esc_html_e('SEO ( BETA Version )', 'catch-web-tools'); ?></h3>
211 </div>
212
213 <div class="module-content">
214 <p>
215 <?php esc_html_e('SEO is in beta version. SEO can be used to add SEO meta tags to Homepage, specific Pages or Posts and Categories page. This section adds SEO meta data to site\'s section.', 'catch-web-tools'); ?>
216 </p>
217 <div class="catch-actions">
218 <form method="post" action="options.php">
219 <?php
220 settings_fields('seo-settings-group');
221
222 $settings = catchwebtools_get_options('catchwebtools_seo');
223
224 if (! empty($settings['status']) && $settings['status']) {
225 echo '<input type="hidden" value="0" name="catchwebtools_seo[status]"/>';
226
227 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
228 } else {
229 echo '<input type="hidden" value="1" name="catchwebtools_seo[status]"/>';
230
231 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
232 }
233 ?>
234
235 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-seo')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
236 </form>
237 </div>
238 </div><!-- #module-content -->
239 </div><!-- #module-seo -->
240 </div><!-- .module-wrap -->
241
242 <div class="module-wrap">
243 <div id="module-catchupdater" class="catch-modules short-desc">
244 <div class="module-header">
245 <h3><?php esc_html_e('Catch Updater', 'catch-web-tools'); ?></h3>
246 </div>
247
248 <div class="module-content">
249
250 <p>
251 <?php esc_html_e('Catch Updater is a simple and lightweight WordPress Theme Updater and Plugin Module, which enables you to update your themes and plugins easily using WordPress Admin Panel.', 'catch-web-tools'); ?>
252 </p>
253
254 <div class="catch-actions">
255 <form method="post" action="options.php">
256 <?php
257 settings_fields('catchupdater-settings-group');
258
259 $settings = catchwebtools_get_options('catchwebtools_catch_updater');
260
261 global $wp_version;
262 if (version_compare($wp_version, '5.5', '<')) :
263 if (! empty($settings['status']) && $settings['status']) {
264 echo '<input type="hidden" value="0" name="catchwebtools_catch_updater[status]"/>';
265
266 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
267 echo '&nbsp;';
268
269 echo '<a class="button button-secondary" href="' . esc_url(admin_url('theme-install.php?upload')) . '">' . esc_html__('Upload Theme', 'catch-web-tools') . '</a>';
270 echo '&nbsp;';
271 echo '<a class="button button-secondary" href="' . esc_url(admin_url('plugin-install.php?upload')) . '">' . esc_html__('Upload Plugin', 'catch-web-tools') . '</a>';
272 } else {
273 echo '<input type="hidden" value="1" name="catchwebtools_catch_updater[status]"/>';
274
275 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
276 }
277 else :
278 ?>
279 <p class="notice notice-warning">
280 <?php
281 printf(
282 wp_kses_post(
283 /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */
284 __('This module has been disabled by default since WordPress version 5.5 and above. For further detail, please visit this %1$slink%2$s', 'catch-web-tools')
285 ),
286 '<a target="_blank" href="' . esc_url('https://catchplugins.com/news/catch-updater-notice-wordpress-5-5/') . '">',
287 '</a>'
288 );
289 ?>
290 </p>
291 <?php
292 endif;
293 ?>
294 </form>
295 </div><!-- .catch-actions -->
296 </div><!-- .catch-content -->
297 </div><!-- #module-catchids -->
298 </div><!-- .module-wrap -->
299
300 <div class="module-wrap">
301 <!--#module-to-top-->
302 <div id="module-to-top" class="catch-modules short-desc">
303 <div class="module-header">
304 <h3><?php esc_html_e('To Top', 'catch-web-tools'); ?></h3>
305 </div>
306
307 <div class="module-content">
308 <p>
309 <?php esc_html_e('To Top plugin allows the visitor as well as admin to easily scroll back to the top of the page, with fully customizable options and ability to use image.', 'catch-web-tools'); ?>
310 </p>
311 <div class="catch-actions">
312 <?php
313 /* Disable Option if Catch IDs plugin is active */
314 if (is_plugin_active('to-top/to-top.php')) :
315 ?>
316 <p class="notice notice-warning">
317 <?php esc_html_e('This module is currently disabled since To Top standalone plugin is already active on your site.', 'catch-web-tools'); ?>
318 </p>
319 <?php else : ?>
320 <form method="post" action="options.php">
321 <?php
322 settings_fields('to-top-settings-group');
323
324 $settings = catchwebtools_get_options('catchwebtools_to_top_options');
325
326 if (! empty($settings['status']) && $settings['status']) {
327 echo '<input type="hidden" value="0" name="catchwebtools_to_top_options[status]"/>';
328
329 submit_button(__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
330 } else {
331 echo '<input type="hidden" value="1" name="catchwebtools_to_top_options[status]"/>';
332
333 submit_button(__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
334 }
335 ?>
336
337 <a class="button button-secondary" href="<?php echo esc_url(admin_url('admin.php?page=catch-web-tools-to-top')); ?>"><?php esc_html_e('Configure', 'catch-web-tools'); ?></a>
338 </form>
339 <?php endif; ?>
340 </div><!-- .module-actions -->
341 </div><!-- .module-content -->
342 </div><!-- #module-to-top -->
343 </div><!-- .module-wrap -->
344
345 <div class="module-wrap">
346 <div id="module-catchupdater" class="catch-modules short-desc">
347 <div class="module-header">
348 <h3><?php esc_html_e('Big Image Size Threshold', 'catch-web-tools'); ?></h3>
349 </div>
350
351 <div class="module-content">
352
353 <p>
354 <?php esc_html_e('This allows you to disable the default Automatic Image Optimization and scaling feature from WordPress.', 'catch-web-tools'); ?>
355 </p>
356
357 <div class="catch-actions">
358 <form method="post" action="options.php">
359 <?php
360 settings_fields('big-image-size-threshold-settings-group');
361
362 $settings = catchwebtools_get_options('catchwebtools_big_image_size_threshold');
363
364 if (! empty($settings['status']) && $settings['status']) {
365 echo '<input type="hidden" value="0" name="catchwebtools_big_image_size_threshold[status]"/>';
366
367 submit_button(esc_html__('Deactivate', 'catch-web-tools'), 'secondary', 'submit', false);
368 echo '&nbsp;';
369 } else {
370 echo '<input type="hidden" value="1" name="catchwebtools_big_image_size_threshold[status]"/>';
371
372 submit_button(esc_html__('Activate', 'catch-web-tools'), 'primary', 'submit', false);
373 }
374 ?>
375 </form>
376 </div><!-- .catch-actions -->
377 </div><!-- .catch-content -->
378 </div><!-- #module-catchids -->
379 </div><!-- .module-wrap -->
380
381 </div><!-- .module-container -->
382 </div><!-- .content -->
383 </div><!-- .content-wrapper -->
384 <div id="ctp-switch" class="content-wrapper col-3 catch-web-tools-main">
385 <div class="header">
386 <h2><?php esc_html_e('Catch Themes & Catch Plugins Tabs', 'catch-web-tools'); ?></h2>
387 </div> <!-- .Header -->
388 <div class="content">
389 <p><?php echo esc_html__('If you want to turn off Catch Themes & Catch Plugins tabs option in Add Themes and Add Plugins page, please uncheck the following option.', 'catch-web-tools'); ?>
390 </p>
391 <table>
392 <tr>
393 <td>
394 <?php echo esc_html__('Turn On Catch Themes & Catch Plugin tabs', 'catch-web-tools'); ?>
395 </td>
396 <td>
397 <?php $ctp_options = ctp_get_options(); ?>
398 <div class="module-header <?php echo $ctp_options['theme_plugin_tabs'] ? 'active' : 'inactive'; ?>">
399 <div class="switch">
400 <input type="hidden" name="ctp_tabs_nonce" id="ctp_tabs_nonce" value="<?php echo esc_attr(wp_create_nonce('ctp_tabs_nonce')); ?>" />
401 <input type="checkbox" id="ctp_options[theme_plugin_tabs]" class="ctp-switch" rel="theme_plugin_tabs" <?php checked(true, $ctp_options['theme_plugin_tabs']); ?>>
402 <label for="ctp_options[theme_plugin_tabs]"></label>
403 </div>
404 <div class="loader"></div>
405 </div>
406 </td>
407 </tr>
408 </table>
409 </div>
410 </div><!-- #ctp-switch -->
411
412 <div class="content-wrapper">
413 <div class="content">
414 <div class="module-container">
415 <div class="module-wrap catch-modules-long">
416 <div id="module-securi-tips" class="catch-modules">
417 <div class="module-header">
418 <h3><?php esc_html_e('Security Tips', 'catch-web-tools'); ?></h3>
419 </div>
420
421 <div class="module-content">
422 <?php
423 if (username_exists('admin')) {
424 echo '<p>' . esc_html__('Caution!!! A user with username: admin exists, need to rename this username or remove it', 'catch-web-tools') . '</p>';
425 } else {
426 echo '<p>' . esc_html__('Congratulations!!! You do not have any users with admin as username', 'catch-web-tools') . '</p>';
427 }
428 ?>
429
430 <?php
431 global $wpdb;
432
433 if ('wp_' == $wpdb->prefix) {
434 echo '<p>' . esc_html__('Caution!!! WordPress Table Prefix is "wp_", need to change this prefix', 'catch-web-tools') . '</p>';
435 } else {
436 echo '<p>' . esc_html__('Congratulations!!! WordPress Table Prefix is not "wp_"', 'catch-web-tools') . '</p>';
437 }
438
439 ?>
440
441 <?php
442 global $wp_version;
443
444 //Get latest WordPress version. More info: wp-admin/includes/updates.php
445 $update = get_core_updates();
446
447 if (version_compare($update[0]->current, $wp_version, '<=')) {
448 echo '<p>' . esc_html__('Congratulations!!! Your WordPress version is the latest.', 'catch-web-tools') . '</p>';
449 } else {
450 echo '<p>' . sprintf(
451 wp_kses_post(
452 // Translators: Information about the newer version. %1$s current version with a %2$s newer version.
453 __('Caution!!! You do not have the current version of WordPress installed. The Current version is %1$s. Your installation version is %2$s Please update it %3$shere%4$s.', 'catch-web-tools')
454 ),
455 esc_html($wp_version),
456 esc_html($update[0]->current),
457 '<a href=' . esc_url(admin_url('update-core.php')) . '>',
458 '</a>'
459 ) . '</p>';
460 }
461
462 //echo print_r( get_core_updates() ) ;
463 ?>
464 </div><!-- .module-content -->
465 </div><!-- #module-securi-tips -->
466 </div><!-- .module-wrap -->
467 </div><!-- .module-container -->
468 </div><!-- .content -->
469 </div><!-- .content-wrapper -->
470
471 </div><!-- #customcss -->
472
473 <?php include('main-footer.php'); ?>