PluginProbe
Catch Web Tools / 3.2
Catch Web Tools v3.2
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 / catch-ids.php

catch-ids.php in Catch Web Tools 3.2, at admin/modules/catch-ids.php

133 lines 8.1 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 Webmaster Display
9 */
10 ?>
11 <?php include('header.php'); ?>
12 <div id="catch-ids" class="catchids-main cwt">
13 <div class="content-wrapper">
14 <div class="header">
15 <h3><?php esc_html_e('Catch IDs', 'catch-web-tools'); ?></h3>
16 </div> <!-- .header -->
17 <div class="content">
18 <?php
19 if (is_plugin_active('catch-ids/catch-ids.php')) : ?>
20 <div class="module-container">
21 <!-- Status -->
22 <div id="module-disabled" class="catch-modules full-width">
23 <div class="module-header disable">
24 <h3 class="module-title"><?php esc_html_e('Status : Disabled', 'catch-web-tools'); ?>
25 </h3>
26 </div><!-- .module-header -->
27 <div class="module-content">
28 <p class="notice notice-warning">
29 <?php esc_html_e('This module is currently disabled since Catch IDs standalone plugin is already active on your site. If you want to configure the Catch IDs please click on the following link.', 'catch-web-tools'); ?>
30 </p>
31 <?php
32 $settings_link = '<a style="margin-top: 10px; display: inline-block; font-size: 13px;" href="' . esc_url(admin_url('admin.php?page=catch-ids')) . '">' . esc_html__('Catch IDs', 'catch-web-tools') . '</a>';
33 echo wp_kses_post($settings_link);
34 ?>
35 </div><!-- .module-content -->
36 </div><!-- .catch-modules -->
37 </div>
38 <?php else: ?>
39 <?php
40 $options = catchwebtools_get_options('catchwebtools_catchids');
41 $post_types = catchwebtools_catchids_get_all_post_types();
42 ?>
43 <!-- Status -->
44 <div id="module-<?php echo 'status'; ?>" class="catch-modules full-width">
45 <div class="module-header <?php echo $options['status'] ? 'active' : 'inactive'; ?>">
46 <h3 class="module-title"><?php esc_html_e('Status', 'catch-web-tools'); ?>
47 <span class="inactive" <?php echo $options['status'] ? 'style="display: none"' : ''; ?>>
48 <?php esc_html_e(': Inactive', 'catch-web-tools'); ?>
49 </span>
50 <span class="active" <?php echo $options['status'] ? '' : 'style="display: none"'; ?>>
51 <?php esc_html_e(': Active', 'catch-web-tools'); ?>
52 </span>
53 </h3>
54 <div class="switch">
55 <input type="hidden" name="catchwebtools_catchids_nonce" id="catchwebtools_catchids_nonce" value="<?php echo esc_attr(wp_create_nonce('catchwebtools_catchids_nonce')); ?>" />
56 <input type="checkbox" id="catchwebtools_catchids[status]" class="catchids-input-switch" rel="status" <?php checked(true, $options['status']); ?>>
57 <label for="catchwebtools_catchids[status]"></label>
58 </div>
59 <div class="loader"></div>
60 </div><!-- .module-header -->
61 </div><!-- .catch-modules -->
62
63 <div class="module-container catch-ids-options" <?php echo ! $options['status'] ? 'style="display: none"' : ''; ?>>
64 <?php foreach ($post_types as $key => $value) : ?>
65 <!-- Custom Post Types -->
66 <div id="module-<?php echo esc_attr($key); ?>" class="catch-modules">
67 <div class="module-header <?php echo $options[$key] ? 'active' : 'inactive'; ?>">
68 <h3 class="module-title"><?php esc_html($value); ?></h3>
69 <div class="switch">
70 <input type="checkbox" id="catchwebtools_catchids[<?php echo esc_attr($key); ?>]" class="catchids-input-switch" rel="<?php echo esc_attr($key); ?>" <?php checked(true, $options[$key]); ?>>
71 <label for="catchwebtools_catchids[<?php echo esc_attr($key); ?>]"></label>
72 </div>
73 <div class="loader"></div>
74 </div><!-- .module-header -->
75 </div><!-- .catch-modules -->
76 <?php endforeach; ?>
77
78 <!-- Media -->
79 <div id="module-<?php echo 'media'; ?>" class="catch-modules">
80 <div class="module-header <?php echo $options['media'] ? 'active' : 'inactive'; ?>">
81 <h3 class="module-title"><?php esc_html_e('Media', 'catch-web-tools'); ?></h3>
82 <div class="switch">
83 <input type="checkbox" id="catchwebtools_catchids[media]" class="catchids-input-switch" rel="media" <?php checked(true, $options['media']); ?>>
84 <label for="catchwebtools_catchids[media]"></label>
85 </div>
86 <div class="loader"></div>
87 </div><!-- .module-header -->
88 </div><!-- .catch-modules -->
89
90 <!-- Categories -->
91 <div id="module-<?php echo 'category'; ?>" class="catch-modules">
92 <div class="module-header <?php echo $options['category'] ? 'active' : 'inactive'; ?>">
93 <h3 class="module-title"><?php esc_html_e('Categories', 'catch-web-tools'); ?></h3>
94 <div class="switch">
95 <input type="checkbox" id="catchwebtools_catchids[category]" class="catchids-input-switch" rel="category" <?php checked(true, $options['category']); ?>>
96 <label for="catchwebtools_catchids[category]"></label>
97 </div>
98 <div class="loader"></div>
99 </div><!-- .module-header -->
100 </div><!-- .catch-modules -->
101
102 <!-- Users -->
103 <div id="module-<?php echo 'user'; ?>" class="catch-modules">
104 <div class="module-header <?php echo $options['user'] ? 'active' : 'inactive'; ?>">
105 <h3 class="module-title"><?php esc_html_e('Users', 'catch-web-tools'); ?></h3>
106 <div class="switch">
107 <input type="checkbox" id="catchwebtools_catchids[user]" class="catchids-input-switch" rel="user" <?php checked(true, $options['user']); ?>>
108 <label for="catchwebtools_catchids[user]"></label>
109 </div>
110 <div class="loader"></div>
111 </div><!-- .module-header -->
112 </div><!-- .catch-modules -->
113
114 <!-- Comments -->
115 <div id="module-<?php echo 'comment'; ?>" class="catch-modules">
116 <div class="module-header <?php echo $options['comment'] ? 'active' : 'inactive'; ?>">
117 <h3 class="module-title"><?php esc_html_e('Comments', 'catch-web-tools'); ?></h3>
118 <div class="switch">
119 <input type="checkbox" id="catchwebtools_catchids[comment]" class="catchids-input-switch" rel="comment" <?php checked(true, $options['comment']); ?>>
120 <label for="catchwebtools_catchids[comment]"></label>
121 </div>
122 <div class="loader"></div>
123 </div><!-- .module-header -->
124 </div><!-- .catch-modules -->
125
126 </div><!-- .module-container -->
127
128 <?php endif; ?>
129 </div><!-- .content -->
130 </div><!-- .content-wrapper -->
131 </div><!-- .catchids-main -->
132
133 <?php include('main-footer.php'); ?>