PluginProbe
Awesome Support – WordPress HelpDesk & Support Plugin / trunk
Awesome Support – WordPress HelpDesk & Support Plugin vtrunk
6.4.0 trunk 3.0.0 3.0.1 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 All 95 releases
awesome-support / includes / admin / views / system-status.php

system-status.php in Awesome Support – WordPress HelpDesk & Support Plugin trunk, at includes/admin/views/system-status.php

553 lines 22.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <p><?php echo wp_kses_post( __( 'The system status is a built-in debugging tool. If you contacted support and you\'re asked to provide the system status, <strong>click the button below</strong> to copy your system report:', 'awesome-support' ) ); ?></p>
2
3 <div class="wpas-system-status">
4 <textarea id="wpas-system-status-output" rows="10" style="display: none;"></textarea>
5 <button id="wpas-system-status-generate-json" class="button-secondary"><?php esc_html_e( 'Copy Report', 'awesome-support' ); ?> - JSON</button>
6 <button id="wpas-system-status-generate-wporg" class="button-secondary"><?php esc_html_e( 'Copy Report', 'awesome-support' ); ?> - WordPress.org</button>
7 </div>
8
9 <table class="widefat wpas-system-status-table" id="wpas-system-status-wordpress">
10 <thead>
11 <tr>
12 <th data-override="key" class="row-title">WordPress</th>
13 <th data-override="value"></th>
14 </tr>
15 </thead>
16 <tbody>
17 <tr>
18 <td class="row-title"><label for="tablecell"><?php echo esc_html__( 'Site URL', 'awesome-support' );?></label></td>
19 <td><?php echo esc_url( site_url() ); ?></td>
20 </tr>
21 <tr class="alternate">
22 <td class="row-title"><label for="tablecell"><?php echo esc_html__( 'Home URL', 'awesome-support' );?></label></td>
23 <td><?php echo esc_url( home_url() ); ?></td>
24 </tr>
25 <tr>
26 <td class="row-title"><?php echo esc_html__( 'WP Version', 'awesome-support' );?></td>
27 <td><?php bloginfo('version'); ?></td>
28 </tr>
29 <tr class="alt">
30 <td class="row-title"><?php echo esc_html__( 'WP Multisite', 'awesome-support' );?></td>
31 <td><?php if ( is_multisite() ) esc_html_e( 'Yes', 'awesome-support' ); else esc_html_e( 'No', 'awesome-support' ); ?></td>
32 </tr>
33 <tr>
34 <td class="row-title"><?php echo esc_html__( 'WP Language', 'awesome-support' );?></td>
35 <td><?php echo esc_html( get_locale() ); ?></td>
36 </tr>
37 <tr class="alt">
38 <td class="row-title"><?php echo esc_html__( 'WP Debug Mode', 'awesome-support' );?></td>
39 <td><?php if ( defined('WP_DEBUG') && WP_DEBUG ) esc_html_e( 'Yes', 'awesome-support' ); else esc_html_e( 'No', 'awesome-support' ); ?></td>
40 </tr>
41 <tr>
42 <td class="row-title"><?php echo esc_html__( 'WP Active Plugins', 'awesome-support' );?></td>
43 <td><?php echo count( (array) get_option( 'active_plugins' ) ); ?></td>
44 </tr>
45 <tr class="alt">
46 <td class="row-title"><?php echo esc_html__( 'WP Max Upload Size', 'awesome-support' );?></td>
47 <td>
48 <?php
49 $wp_upload_max = wp_max_upload_size();
50 $server_upload_max = intval( str_replace( 'M', '', ini_get('upload_max_filesize') ) ) * 1024 * 1024;
51
52 if ( $wp_upload_max <= $server_upload_max ) {
53 echo esc_html( size_format( $wp_upload_max ) );
54 } else {
55 // translators: %1$s is the value being referenced, %2$s is the server's limit.
56 $x_content = __( '%1$s (The server only allows %2$s)', 'awesome-support' );
57
58 echo '<span class="wpas-alert-danger">' . sprintf( esc_html($x_content), esc_html( size_format( $wp_upload_max ) ), esc_html( size_format( $server_upload_max ) ) ) . '</span>';
59 }
60 ?>
61 </td>
62 </tr>
63 <tr>
64 <td class="row-title"><?php echo esc_html__( 'WP Memory Limit', 'awesome-support' );?></td>
65 <td><?php echo esc_html( WP_MEMORY_LIMIT ); ?></td>
66 </tr>
67 <tr class="alt">
68 <td class="row-title"><?php echo esc_html__( 'WP Timezone', 'awesome-support' );?></td>
69 <td>
70 <?php
71 $timezone = get_option( 'timezone_string' );
72 $gmtoffset= get_option( 'gmt_offset' ) ;
73
74 if ( empty( $timezone ) && empty( $gmtoffset ) && '0' <> $gmtoffset ) {
75 echo '<span class="wpas-alert-danger">' . esc_html__( 'The timezone hasn\'t been set', 'awesome-support' ) . '</span>';
76 } else {
77 echo esc_html( $timezone . ' (UTC' . wpas_get_offset_html5() . ')' );
78 }
79 ?>
80 </td>
81 </tr>
82 </tbody>
83 </table>
84 <table class="widefat wpas-system-status-table" id="wpas-system-status-server">
85 <thead>
86 <tr>
87 <th data-override="key" class="row-title"><?php echo esc_html__( 'Version', 'awesome-support' );?>Server</th>
88 <th data-override="value"></th>
89 </tr>
90 </thead>
91 <tbody>
92 <tr>
93 <td class="row-title"><?php echo esc_html__( 'Version', 'awesome-support' );?>PHP Version</td>
94 <td><?php if ( function_exists( 'phpversion' ) ) echo esc_html( phpversion() ); ?></td>
95 </tr>
96 <tr class="alternate">
97 <td class="row-title"><?php echo esc_html__( 'Version', 'awesome-support' );?>Software</td>
98 <td><?php echo esc_html( isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ): '' ); ?></td>
99 </tr>
100 </tbody>
101 </table>
102 <table class="widefat wpas-system-status-table" id="wpas-system-status-settings">
103 <thead>
104 <tr>
105 <th data-override="key" class="row-title"><?php echo esc_html__( 'Settings', 'awesome-support' );?></th>
106 <th data-override="value"></th>
107 </tr>
108 </thead>
109 <tbody>
110 <tr>
111 <td class="row-title"><?php echo esc_html__( 'Version', 'awesome-support' );?></td>
112 <td><?php echo esc_html( WPAS_VERSION ); ?></td>
113 </tr>
114 <tr class="alt">
115 <td class="row-title"><?php echo esc_html__( 'DB Version', 'awesome-support' );?></td>
116 <td><?php echo esc_html( WPAS_DB_VERSION ); ?></td>
117 </tr>
118 <tr>
119 <td class="row-title"><?php echo esc_html__( 'Tickets Slug', 'awesome-support' );?></td>
120 <td><code><?php echo defined( 'WPAS_SLUG' ) ? esc_html( WPAS_SLUG ) : 'ticket'; ?></code></td>
121 </tr>
122 <tr class="alt">
123 <td class="row-title"><?php echo esc_html__( 'Products Slug', 'awesome-support' );?></td>
124 <td><code><?php echo defined( 'WPAS_PRODUCT_SLUG' ) ? esc_html( WPAS_PRODUCT_SLUG ) : 'product'; ?></code></td>
125 </tr>
126 <tr>
127 <td class="row-title"><?php echo esc_html__( 'Multiple Products', 'awesome-support' );?></td>
128 <td><?php true === boolval( wpas_get_option( 'support_products' ) ) ? esc_html_e( 'Enabled', 'awesome-support' ) : esc_html_e( 'Disabled', 'awesome-support'); ?></td>
129 </tr>
130 <tr class="alt">
131 <td class="row-title"><?php echo esc_html__( 'Registration Status', 'awesome-support' );?></td>
132 <td><?php 'allow' === wpas_get_option( 'allow_registrations' ) ? esc_html_e( 'Open', 'awesome-support' ) : esc_html_e( 'Closed', 'awesome-support'); ?></td>
133 </tr>
134 <tr>
135 <td class="row-title"><?php echo esc_html__( 'Registration Page', 'awesome-support' );?></td>
136 <td>
137 <?php
138 $login_page = wpas_get_option( 'login_page' );
139 if ( empty( $login_page ) ) {
140 esc_html_e( 'Default', 'awesome-support' );
141 } else {
142 echo esc_url( get_permalink( $login_page ) . " (#$login_page)" );
143 }
144 ?>
145 </td>
146 </tr>
147 <tr class="alt">
148 <td class="row-title"><?php echo esc_html__( 'Uploads Folder', 'awesome-support' );?></td>
149 <td>
150 <?php
151
152 global $wp_filesystem;
153
154 // Initialize the filesystem
155 if (empty($wp_filesystem)) {
156 require_once(ABSPATH . '/wp-admin/includes/file.php');
157 WP_Filesystem();
158 }
159
160 if ( !is_dir( ABSPATH . 'wp-content/uploads/awesome-support' ) ) {
161 if ( !$wp_filesystem->is_writable( ABSPATH . 'wp-content/uploads' ) ) {
162 echo '<span class="wpas-alert-danger">' . esc_html__( 'The upload folder doesn\'t exist and can\'t be created', 'awesome-support' ) . '</span>';
163 } else {
164 echo '<span class="wpas-alert-success">' . esc_html__( 'The upload folder doesn\'t exist but can be created', 'awesome-support' ) . '</span>';
165 }
166 } else {
167 if ( !$wp_filesystem->is_writable( ABSPATH . 'wp-content/uploads/awesome-support' ) ) {
168 echo '<span class="wpas-alert-danger">' . esc_html__( 'The upload folder exists but isn\'t writable', 'awesome-support' ) . '</span>';
169 } else {
170 echo '<span class="wpas-alert-success">' . esc_html__( 'The upload folder exists and is writable', 'awesome-support' ) . '</span>';
171 }
172 }
173 ?>
174 </td>
175 </tr>
176 <tr>
177 <td class="row-title"><?php echo esc_html__( 'Allowed File Types', 'awesome-support' );?></td>
178 <td>
179 <?php
180 $filetypes = apply_filters( 'wpas_attachments_filetypes', wpas_get_option( 'attachments_filetypes' ) );
181
182 if ( empty( $filetypes ) ) {
183 echo '<span class="wpas-alert-danger">' . esc_html_x( 'None', 'Allowed file types for attachments', 'awesome-support' ) . '</span>';
184 } else {
185 $filetypes = explode( ',', $filetypes );
186 foreach ( $filetypes as $key => $type ) { $filetypes[$key] = "<code>.$type</code>"; }
187 $filetypes = implode( ', ', $filetypes );
188 echo wp_kses_post( $filetypes );
189 }
190 ?>
191 </td>
192 </tr>
193 <tr class="alt">
194 <td class="row-title"><?php echo esc_html__( 'WYSIWYG On Front', 'awesome-support' );?></td>
195 <td><?php true === boolval( wpas_get_option( 'frontend_wysiwyg_editor' ) ) ? esc_html_e( 'Yes', 'awesome-support' ) : esc_html_e( 'No', 'awesome-support'); ?></td>
196 </tr>
197 </tbody>
198 </table>
199 <table class="widefat wpas-system-status-table" id="wpas-system-status-pages">
200 <thead>
201 <tr>
202 <th data-override="key" class="row-title"><?php echo esc_html__( 'Plugin Pages', 'awesome-support' );?></th>
203 <th data-override="value"></th>
204 </tr>
205 </thead>
206 <tbody>
207 <tr>
208 <td class="row-title"><?php echo esc_html__( 'Ticket Submission', 'awesome-support' );?></td>
209 <?php $page_submit = wpas_get_option( 'ticket_submit' ); ?>
210 <td>
211 <?php
212 if ( empty( $page_submit ) ) {
213 echo '<span class="wpas-alert-danger">Not set</span>';
214 } else {
215
216 $submission_pages = array();
217
218 if ( ! is_array( $page_submit ) ) {
219 $page_submit = (array) $page_submit;
220 }
221
222 foreach ( $page_submit as $page_submit_id ) {
223 $page_submit_url = wpas_get_submission_page_url( $page_submit_id );
224 array_push( $submission_pages, "<span class='wpas-alert-success'>" . esc_url( $page_submit_url ) . " (#$page_submit_id)</span>" );
225 }
226
227 echo wp_kses(implode( ', ', $submission_pages ), get_allowed_html_wp_notifications());
228
229 }
230 ?>
231 </td>
232 </tr>
233 <tr>
234 <td class="row-title"><?php echo esc_html__( 'Tickets List', 'awesome-support' );?></td>
235 <?php
236 $page_list = wpas_get_option( 'ticket_list' );
237
238 if ( is_array( $page_list ) && ! empty( $page_list ) ) {
239 $page_list = $page_list[0];
240 }
241 ?>
242 <td><?php echo empty( $page_list ) ? '<span class="wpas-alert-danger">Not set</span>' : "<span class='wpas-alert-success'>" . esc_url( get_permalink( $page_list ) ) . " (#" . wp_kses($page_list , get_allowed_html_wp_notifications()) . ")</span>"; ?></td>
243 </tr>
244 </tbody>
245 </table>
246 <table class="widefat wpas-system-status-table" id="wpas-system-status-email-notifications">
247 <thead>
248 <tr>
249 <th data-override="key" class="row-title"><?php echo esc_html__( 'E-Mail Notifications', 'awesome-support' );?></th>
250 <th data-override="value"></th>
251 </tr>
252 </thead>
253 <tbody>
254 <tr>
255 <td class="row-title"><?php echo esc_html__( 'Sender Name', 'awesome-support' );?></td>
256 <td>
257 <?php echo esc_html( wpas_get_option( 'sender_name', get_bloginfo( 'name' ) ) ); ?>
258 </td>
259 </tr>
260 <tr>
261 <td class="row-title"><?php echo esc_html__( 'Sender E-Mail', 'awesome-support' );?></td>
262 <td>
263 <?php echo esc_html( wpas_get_option( 'sender_email', get_bloginfo( 'admin_email' ) ) ); ?>
264 </td>
265 </tr>
266 <tr>
267 <td class="row-title"><?php echo esc_html__( 'Reply-To E-Mail', 'awesome-support' );?></td>
268 <td>
269 <?php echo esc_html( wpas_get_option( 'reply_email', get_bloginfo( 'admin_email' ) ) ); ?>
270 </td>
271 </tr>
272 <tr>
273 <td class="row-title"><?php echo esc_html__( 'Submission Confirmation', 'awesome-support' );?></td>
274 <td>
275 <?php echo true === boolval( wpas_get_option( 'enable_confirmation' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
276 </td>
277 </tr>
278 <tr class="alt">
279 <td class="row-title"><?php echo esc_html__( 'New Assignment', 'awesome-support' );?></td>
280 <td>
281 <?php echo true === boolval( wpas_get_option( 'enable_assignment' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
282 </td>
283 </tr>
284 <tr>
285 <td class="row-title"><?php echo esc_html__( 'New Agent Reply', 'awesome-support' );?></td>
286 <td>
287 <?php echo true === boolval( wpas_get_option( 'enable_reply_agent' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
288 </td>
289 </tr>
290 <tr class="alt">
291 <td class="row-title"><?php echo esc_html__( 'New Client Reply', 'awesome-support' );?></td>
292 <td>
293 <?php echo true === boolval( wpas_get_option( 'enable_reply_client' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
294 </td>
295 </tr>
296 <tr>
297 <td class="row-title"><?php echo esc_html__( 'Ticket Closed', 'awesome-support' );?></td>
298 <td>
299 <?php echo true === boolval( wpas_get_option( 'enable_closed' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
300 </td>
301 </tr>
302
303 <tr>
304 <td class="row-title"><?php echo esc_html__( 'Moderated Registration: Admin Alert', 'awesome-support' );?></td>
305 <td>
306 <?php echo true === boolval( wpas_get_option( 'enable_moderated_registration_admin_email' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
307 </td>
308 </tr>
309 <tr>
310 <td class="row-title"><?php echo esc_html__( 'Moderated Registration: User Waiting Approval', 'awesome-support' );?></td>
311 <td>
312 <?php echo true === boolval( wpas_get_option( 'enable_moderated_registration_user_email' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
313 </td>
314 </tr>
315 <tr>
316 <td class="row-title"><?php echo esc_html__( 'Moderated Registration: User Approved', 'awesome-support' );?></td>
317 <td>
318 <?php echo true === boolval( wpas_get_option( 'enable_moderated_registration_approved_user_email' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
319 </td>
320 </tr>
321 <tr>
322 <td class="row-title"><?php echo esc_html__( 'Moderated Registration: User Denied', 'awesome-support' );?></td>
323 <td>
324 <?php echo true === boolval( wpas_get_option( 'enable_moderated_registration_denied_user_email' ) ) ? '<span class="wpas-alert-success">'. esc_html__( 'Enabled', 'awesome-support' ) .'</span>' : '<span class="wpas-alert-danger">'. esc_html__( 'Disabled', 'awesome-support' ) .'</span>'; ?>
325 </td>
326 </tr>
327
328 </tbody>
329 </table>
330 <table class="widefat wpas-system-status-table" id="wpas-system-status-custom-fields">
331 <thead>
332 <tr>
333 <th data-override="key" class="row-title"><?php echo esc_html__( 'Custom Fields', 'awesome-support' );?></th>
334 <th data-override="value"></th>
335 </tr>
336 </thead>
337 <tbody>
338 <?php
339
340 $fields = WPAS()->custom_fields->get_custom_fields();
341
342 if ( empty( $fields ) ) { ?>
343 <td colspan="2">None</td>
344 <?php } else {
345
346 $cf_tr_class = 'alt';
347
348 foreach ( $fields as $field_id => $field ) {
349
350 $cf_tr_class = 'alt' === $cf_tr_class ? '' : 'alt';
351 $values = array();
352 $attributes = array( __( 'Capability', 'awesome-support' ) => '<code>' . $field['args']['capability'] . '</code>' );
353 $attributes[__( 'Core', 'awesome-support')] = true === boolval( $field['args']['core'] ) ? __( 'Yes', 'awesome-support' ) : __( 'No', 'awesome-support' );
354 $attributes[__( 'Required', 'awesome-support')] = true === boolval( $field['args']['required'] ) ? __( 'Yes', 'awesome-support' ) : __( 'No', 'awesome-support' );
355 $attributes[__( 'Logged', 'awesome-support')] = true === boolval( $field['args']['log'] ) ? __( 'Yes', 'awesome-support' ) : __( 'No', 'awesome-support' );
356 $attributes[__( 'Show Column', 'awesome-support')] = true === boolval( $field['args']['show_column'] ) ? __( 'Yes', 'awesome-support' ) : __( 'No', 'awesome-support' );
357
358 if ( 'taxonomy' === $field['args']['field_type'] ) {
359 if ( true === boolval( $field['args']['taxo_std'] ) ) {
360 $attributes[__( 'Taxonomy', 'awesome-support')] = __( 'Yes (standard)', 'awesome-support' );
361 } else {
362 $attributes[__( 'Taxonomy', 'awesome-support')] = __( 'Yes (custom)', 'awesome-support' );
363 }
364 } else {
365 $attributes[__( 'Taxonomy', 'awesome-support')] = __( 'No', 'awesome-support' );
366 }
367
368 $attributes[__( 'Callback', 'awesome-support')] = '<code>' . $field['args']['field_type'] . '</code>';
369
370 foreach ( $attributes as $label => $value ) {
371 array_push( $values, "<strong>$label</strong>: $value" );
372 }
373 ?>
374
375 <tr <?php if ( !empty( $cf_tr_class ) ) echo "class='" . wp_kses($cf_tr_class, get_allowed_html_wp_notifications()) . "'"; ?>>
376 <td class="row-title"><?php echo esc_html( wpas_get_field_title( $field ) ); ?></td>
377 <td><?php echo wp_kses(implode( ', ', $values ), [ 'strong' => [] ]); ?></td>
378 </tr>
379
380 <?php }
381 } ?>
382 </tbody>
383 </table>
384 <table class="widefat wpas-system-status-table" id="wpas-system-status-plugins">
385 <thead>
386 <tr>
387 <th data-override="key" class="row-title"><?php echo esc_html__( 'Plugins', 'awesome-support' );?></th>
388 <th data-override="value"></th>
389 </tr>
390 </thead>
391 <tbody>
392 <tr>
393 <td class="row-title"><?php echo esc_html__( 'Installed', 'awesome-support' );?></td>
394 <td>
395 <?php
396 $active_plugins = (array) get_option( 'active_plugins', array() );
397
398 if ( is_multisite() )
399 $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
400
401 $wp_plugins = array();
402
403 foreach ( $active_plugins as $plugin ) {
404
405 $plugin_data = @get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
406 $dirname = dirname( $plugin );
407 $version_string = '';
408
409 if ( ! empty( $plugin_data['Name'] ) ) {
410
411 // link the plugin name to the plugin url if available
412 $plugin_name = $plugin_data['Name'];
413 if ( ! empty( $plugin_data['PluginURI'] ) ) {
414 $plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="Visit plugin homepage">' . $plugin_name . '</a>';
415 }
416
417 $wp_plugins[] = $plugin_name . ' by ' . $plugin_data['Author'] . ' version ' . $plugin_data['Version'] . $version_string;
418
419 }
420 }
421
422 if ( sizeof( $wp_plugins ) == 0 )
423 echo '-';
424 else
425 echo wp_kses(implode( ', <br/>', $wp_plugins ), get_allowed_html_wp_notifications());
426
427 ?>
428 </td>
429 </tr>
430 </tbody>
431 </table>
432 <table class="widefat wpas-system-status-table" id="wpas-system-status-theme">
433 <thead>
434 <tr>
435 <th data-override="key" class="row-title"><?php echo esc_html__( 'Theme', 'awesome-support' );?></th>
436 <th data-override="value"></th>
437 </tr>
438 </thead>
439 <tbody>
440 <tr>
441 <td class="row-title"><?php echo esc_html__( 'Theme Name:', 'awesome-support' );?></td>
442 <td><?php
443 $active_theme = wp_get_theme();
444 echo esc_html( $active_theme->Name );
445 ?></td>
446 </tr>
447 <tr class="alt">
448 <td class="row-title"><?php echo esc_html__( 'Theme Version:', 'awesome-support' );?></td>
449 <td><?php
450 echo esc_html( $active_theme->Version );
451 ?></td>
452 </tr>
453 <tr>
454 <td class="row-title"><?php echo esc_html__( 'Theme Author URL:', 'awesome-support' );?></td>
455 <td><?php
456 echo esc_url( $active_theme->{'Author URI'} );
457 ?></td>
458 </tr>
459 <tr class="alt">
460 <td class="row-title"><?php echo esc_html__( 'Is Child Theme:', 'awesome-support' );?></td>
461 <td><?php echo is_child_theme() ? esc_html__( 'Yes', 'awesome-support' ) : esc_html__( 'No', 'awesome-support' ); ?></td>
462 </tr>
463 <?php
464 if( is_child_theme() ) :
465 $parent_theme = wp_get_theme( $active_theme->Template );
466 ?>
467 <tr>
468 <td class="row-title"><?php echo esc_html__( 'Parent Theme Name:', 'awesome-support' );?></td>
469 <td><?php echo esc_html( $parent_theme->Name ); ?></td>
470 </tr>
471 <tr class="alt">
472 <td class="row-title"><?php echo esc_html__( 'Parent Theme Version:', 'awesome-support' );?></td>
473 <td><?php echo esc_html( $parent_theme->Version ); ?></td>
474 </tr>
475 <tr>
476 <td class="row-title"><?php echo esc_html__( 'Parent Theme Author URL:', 'awesome-support' );?></td>
477 <td><?php
478 echo esc_url( $parent_theme->{'Author URI'} );
479 ?></td>
480 </tr>
481 <?php endif ?>
482 </tbody>
483 </table>
484 <table class="widefat wpas-system-status-table" id="wpas-system-status-templates">
485 <thead>
486 <tr>
487 <th data-override="key" class="row-title"><?php echo esc_html__( 'Templates', 'awesome-support' );?></th>
488 <th data-override="value"></th>
489 </tr>
490 </thead>
491 <tbody>
492 <tr>
493 <td class="row-title"><?php echo esc_html__( 'Template:', 'awesome-support' );?></td>
494 <td><?php
495 echo esc_html( wpas_get_theme() );
496 ?></td>
497 </tr>
498 <tr>
499 <td class="row-title"><?php echo esc_html__( 'Template Theme Overlay:', 'awesome-support' );?></td>
500 <td><?php
501 echo esc_html( wpas_get_Overlay() );
502 ?></td>
503 </tr>
504 <tr>
505 <td class="row-title"><?php echo esc_html__( 'Template Overrides:', 'awesome-support' );?></td>
506 <td>
507 <?php
508 $theme_directory = trailingslashit( get_template_directory() ) . 'awesome-support';
509 $child_theme_directory = trailingslashit( get_stylesheet_directory() ) . 'awesome-support';
510 $templates = array(
511 'details.php',
512 'list.php',
513 'registration.php',
514 'submission.php'
515 );
516
517 if ( is_dir( $child_theme_directory ) ) {
518
519 $overrides = wpas_check_templates_override( $child_theme_directory );
520
521 if ( !empty( $overrides ) ) {
522 echo '<ul>';
523 foreach ( $overrides as $key => $override ) {
524 echo "<li><code>" . wp_kses($override, get_allowed_html_wp_notifications()) . "</code></li>";
525 }
526 echo '</ul>';
527 } else {
528 echo esc_html__( 'There is no template override', 'awesome-support' );
529 }
530
531 } elseif ( is_dir( $theme_directory ) ) {
532
533 $overrides = wpas_check_templates_override( $theme_directory );
534
535 if ( !empty( $overrides ) ) {
536 echo '<ul>';
537 foreach ( $overrides as $key => $override ) {
538 echo "<li><code>" . wp_kses($override, get_allowed_html_wp_notifications()) . "</code></li>";
539 }
540 echo '</ul>';
541 } else {
542 echo esc_html__( 'There is no template override', 'awesome-support' );
543 }
544
545 } else {
546 echo esc_html__( 'There is no template override', 'awesome-support' );
547 }
548 ?>
549 </td>
550 </tr>
551 </tbody>
552 </table>
553