PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 2.5.7
GiveWP – Donation Plugin and Fundraising Platform v2.5.7
4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / includes / admin / tools / views / html-admin-page-system-info.php
give / includes / admin / tools / views Last commit date
html-admin-page-data.php 7 years ago html-admin-page-exports.php 6 years ago html-admin-page-import-core-settings.php 7 years ago html-admin-page-import-donations.php 7 years ago html-admin-page-imports.php 6 years ago html-admin-page-system-info.php 6 years ago
html-admin-page-system-info.php
1032 lines
1 <?php
2 /**
3 * Admin View: System Info
4 */
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 /**
11 * The following code is a derivative work of the code from the WooCommerce
12 * plugin, which is licensed GPLv3. This code therefore is also licensed under
13 * the terms of the GNU Public License, version 3.
14 *
15 * Copyright (c) 2015 WooThemes
16 * Copyright (c) 2016 GiveWP
17 */
18
19 global $wpdb;
20 $give_options = give_get_settings();
21 $plugins = give_get_plugins();
22 $give_add_ons = give_get_plugins( array( 'only_add_on' => true ) );
23
24 $give_plugin_authors = array( 'WordImpress', 'GiveWP' );
25
26 /* @var Give_Updates $give_updates */
27 $give_updates = Give_Updates::get_instance();
28 ?>
29
30 <div class="give-debug-report-wrapper">
31 <p class="give-debug-report-text"><?php echo sprintf(__( 'Please copy and paste this information in your ticket when contacting support:', 'give' )); ?> </p>
32 <div class="give-debug-report-actions">
33 <a class="button-primary js-give-debug-report-button" href="#"><?php _e( 'Get System Report', 'give' ); ?></a>
34 <a class="button-secondary docs" href="http://docs.givewp.com/settings-system-info" target="_blank"><?php _e( 'Understanding the System Report', 'give' ); ?> <span class="dashicons dashicons-external"></span></a>
35 </div>
36 <div class="give-debug-report js-give-debug-report">
37 <textarea readonly="readonly"></textarea>
38 </div>
39 </div>
40
41 <table class="give-status-table widefat" cellspacing="0" id="status">
42 <thead>
43 <tr>
44 <th colspan="3" data-export-label="WordPress Environment"><h2><?php _e( 'WordPress Environment', 'give' ); ?></h2></th>
45 </tr>
46 </thead>
47 <tbody>
48 <tr>
49 <td data-export-label="Home URL"><?php _e( 'Home URL', 'give' ); ?>:</td>
50 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The URL of your site\'s homepage.', 'give' ) ); ?></td>
51 <td><?php form_option( 'home' ); ?></td>
52 </tr>
53 <tr>
54 <td data-export-label="Site URL"><?php _e( 'Site URL', 'give' ); ?>:</td>
55 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The root URL of your site.', 'give' ) ); ?></td>
56 <td><?php form_option( 'siteurl' ); ?></td>
57 </tr>
58 <tr>
59 <td data-export-label="WP Version"><?php _e( 'WP Version', 'give' ); ?>:</td>
60 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of WordPress installed on your site.', 'give' ) ); ?></td>
61 <td><?php bloginfo( 'version' ); ?></td>
62 </tr>
63 <tr>
64 <td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'give' ); ?>:</td>
65 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether or not you have WordPress Multisite enabled.', 'give' ) ); ?></td>
66 <td><?php if ( is_multisite() ) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
67
68 </tr>
69 <tr>
70 <td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'give' ); ?>:</td>
71 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The maximum amount of memory (RAM) that your site can use at one time.', 'give' ) ); ?></td>
72 <td>
73 <?php
74 $memory = give_let_to_num( WP_MEMORY_LIMIT );
75
76 if ( function_exists( 'memory_get_usage' ) ) {
77 $system_memory = give_let_to_num( @ini_get( 'memory_limit' ) );
78 $memory = max( $memory, $system_memory );
79 }
80
81 if ( $memory < 67108864 ) {
82 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend setting memory to at least 64 MB. See: %s', 'give' ), size_format( $memory ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">' . __( 'Increasing memory allocated to PHP', 'give' ) . '</a>' ) . '</mark>';
83 } else {
84 echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
85 }
86 ?>
87 </td>
88 </tr>
89 <tr>
90 <td data-export-label="WP Debug Mode"><?php _e( 'WP Debug Mode', 'give' ); ?>:</td>
91 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether or not WordPress is in Debug Mode.', 'give' ) ); ?></td>
92 <td>
93 <?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) : ?>
94 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
95 <?php else : ?>
96 <mark class="no">&ndash;</mark>
97 <?php endif; ?>
98 </td>
99 </tr>
100 <tr>
101 <td data-export-label="WP Cron"><?php _e( 'WP Cron', 'give' ); ?>:</td>
102 <td class="help"><?php echo Give()->tooltips->render( __( 'Displays whether or not WP Cron Jobs are enabled.', 'give' ) ); ?></td>
103 <td>
104 <?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
105 <mark class="no">&ndash;</mark>
106 <?php else : ?>
107 <mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
108 <?php endif; ?>
109 </td>
110 </tr>
111 <tr>
112 <td data-export-label="Language"><?php _e( 'Language', 'give' ); ?>:</td>
113 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The current language used by WordPress. Default = English', 'give' ) ); ?></td>
114 <td><?php echo get_locale(); ?></td>
115 </tr>
116 <tr>
117 <td data-export-label="Permalink Structure"><?php _e( 'Permalink Structure', 'give' ); ?>:</td>
118 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The permalink structure as defined in Settings.', 'give' ) ); ?></td>
119 <td><?php echo esc_html( get_option( 'permalink_structure', __( 'Default', 'give' ) ) ); ?></td>
120 </tr>
121 <tr>
122 <td data-export-label="Show on Front"><?php _e( 'Show on Front', 'give' ); ?>:</td>
123 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether your front page is set to show posts or a static page.', 'give' ) ); ?></td>
124 <td><?php echo esc_html( get_option( 'show_on_front', '&ndash;' ) ); ?></td>
125 </tr>
126 <?php if ( 'page' === get_option( 'show_on_front' ) ) : ?>
127 <?php
128 $front_page_id = absint( get_option( 'page_on_front' ) );
129 $blog_page_id = absint( get_option( 'page_for_posts' ) );
130 ?>
131 <tr>
132 <td data-export-label="Page on Front"><?php _e( 'Page on Front', 'give' ); ?>:</td>
133 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page set to display as your front page.', 'give' ) ); ?></td>
134 <td><?php echo 0 !== $front_page_id ? esc_html( get_the_title( $front_page_id ) . ' (#' . $front_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
135 </tr>
136 <tr>
137 <td data-export-label="Page for Posts"><?php _e( 'Page for Posts', 'give' ); ?>:</td>
138 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page set to display your posts.', 'give' ) ); ?></td>
139 <td><?php echo 0 !== $blog_page_id ? esc_html( get_the_title( $blog_page_id ) . ' (#' . $blog_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
140 </tr>
141 <?php endif;?>
142 <tr>
143 <td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix', 'give' ); ?>:</td>
144 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The table prefix used in your WordPress database.', 'give' ) ); ?></td>
145 <td><?php echo esc_html( $wpdb->prefix ); ?></td>
146 </tr>
147 <tr>
148 <td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix Length', 'give' ); ?>:</td>
149 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The length of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
150 <td><?php echo esc_html( strlen( $wpdb->prefix ) ); ?></td>
151 </tr>
152 <tr>
153 <td data-export-label="Table Prefix Status"><?php _e( 'Table Prefix Status', 'give' ); ?>:</td>
154 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The status of the table prefix used in your WordPress database.', 'give' ) ); ?></td>
155 <td><?php echo strlen( $wpdb->prefix ) > 16 ? esc_html( 'Error: Too long', 'give' ) : esc_html( 'Acceptable', 'give' ); ?></td>
156 </tr>
157 <tr>
158 <td data-export-label="Admin AJAX"><?php _e( 'Admin AJAX', 'give' ); ?>:</td>
159 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether Admin AJAX is accessible.', 'give' ) ); ?></td>
160 <td><?php echo give_test_ajax_works( true ) ? __( 'Accessible', 'give' ) : __( 'Inaccessible', 'give' ); ?></td>
161 </tr>
162 <tr>
163 <td data-export-label="Registered Post Statuses"><?php _e( 'Registered Post Statuses', 'give' ); ?>:</td>
164 <td class="help"><?php echo Give()->tooltips->render_help( __( 'A list of all registered post statuses.', 'give' ) ); ?></td>
165 <td><?php echo esc_html( implode( ', ', get_post_stati() ) ); ?></td>
166 </tr>
167 </tbody>
168 </table>
169
170 <table class="give-status-table widefat" cellspacing="0">
171 <thead>
172 <tr>
173 <th colspan="3" data-export-label="Server Environment"><h2><?php _e( 'Server Environment', 'give' ); ?></h2></th>
174 </tr>
175 </thead>
176 <tbody>
177 <tr>
178 <td data-export-label="Hosting Provider"><?php _e( 'Hosting Provider', 'give' ); ?>:</td>
179 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The hosting provider for this WordPress installation.', 'give' ) ); ?></td>
180 <td><?php echo give_get_host() ? esc_html( give_get_host() ) : __( 'Unknown', 'give' ); ?></td>
181 </tr>
182 <tr>
183 <td data-export-label="TLS Connection"><?php _e( 'TLS Connection', 'give' ); ?>:</td>
184 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Most payment gateway APIs only support connections using the TLS 1.2 security protocol.', 'give' ) ); ?></td>
185 <td>
186 <?php
187 $tls_check = false;
188
189 // Get the SSL status.
190 if ( ini_get( 'allow_url_fopen' ) ) {
191 $tls_check = file_get_contents( 'https://www.howsmyssl.com/a/check' );
192 }
193
194 if ( false !== $tls_check ) {
195 $tls_check = json_decode( $tls_check );
196 /* translators: %s: SSL connection response */
197 printf( __( 'Connection uses %s', 'give' ), esc_html( $tls_check->tls_version ) );
198 }
199 ?>
200 </td>
201 </tr>
202 <tr>
203 <td data-export-label="TLS Connection"><?php _e( 'TLS Rating', 'give' ); ?>:</td>
204 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The server\'s connection as rated by https://www.howsmyssl.com/', 'give' ) ); ?></td>
205 <td>
206 <?php
207 if ( false !== $tls_check ) {
208 esc_html_e( property_exists( $tls_check, 'rating' ) ? $tls_check->rating : $tls_check->tls_version );
209 }
210 ?>
211 </td>
212 </tr>
213 <tr>
214 <td data-export-label="Server Info"><?php _e( 'Server Info', 'give' ); ?>:</td>
215 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Information about the web server that is currently hosting your site.', 'give' ) ); ?></td>
216 <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
217 </tr>
218 <tr>
219 <td data-export-label="PHP Version"><?php _e( 'PHP Version', 'give' ); ?>:</td>
220 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of PHP installed on your hosting server.', 'give' ) ); ?></td>
221 <td>
222 <?php
223 // Check if phpversion function exists.
224 if ( function_exists( 'phpversion' ) ) {
225 $php_version = phpversion();
226
227 if ( version_compare( $php_version, '5.6', '<' ) ) {
228 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum PHP version of 5.6. See: %s', 'give' ), esc_html( $php_version ), '<a href="http://docs.givewp.com/settings-system-info" target="_blank">' . __( 'PHP Requirements in Give', 'give' ) . '</a>' ) . '</mark>';
229 } else {
230 echo '<mark class="yes">' . esc_html( $php_version ) . '</mark>';
231 }
232 } else {
233 _e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'give' );
234 }
235 ?></td>
236 </tr>
237 <?php if ( function_exists( 'ini_get' ) ) : ?>
238 <tr>
239 <td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'give' ); ?>:</td>
240 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be contained in one post.', 'give' ) ); ?></td>
241 <td><?php echo size_format( give_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
242 </tr>
243 <tr>
244 <td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'give' ); ?>:</td>
245 <td class="help"><?php echo Give() ->tooltips->render_help( __( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups).', 'give' ) ); ?></td>
246 <td><?php echo ini_get( 'max_execution_time' ); ?></td>
247 </tr>
248 <tr>
249 <td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'give' ); ?>:</td>
250 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'give' ) ); ?></td>
251 <td><?php echo ini_get( 'max_input_vars' ); ?></td>
252 </tr>
253 <tr>
254 <td data-export-label="PHP Max Upload Size"><?php _e( 'PHP Max Upload Size', 'give' ); ?>:</td>
255 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be uploaded to your WordPress installation.', 'give' ) ); ?></td>
256 <td><?php echo size_format( wp_max_upload_size() ); ?></td>
257 </tr>
258 <tr>
259 <td data-export-label="cURL Version"><?php _e( 'cURL Version', 'give' ); ?>:</td>
260 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of cURL installed on your server.', 'give' ) ); ?></td>
261 <td>
262 <?php
263 if ( function_exists( 'curl_version' ) ) {
264 $curl_version = curl_version();
265
266 if ( version_compare( $curl_version['version'], '7.40', '<' ) ) {
267 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum cURL version of 7.40.', 'give' ), esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) ) . '</mark>';
268 } else {
269 echo '<mark class="yes">' . esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) . '</mark>';
270 }
271 } else {
272 echo '&ndash';
273 }
274 ?>
275 </td>
276 </tr>
277 <tr>
278 <td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'give' ); ?>:</td>
279 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'give' ) ); ?></td>
280 <td><?php echo extension_loaded( 'suhosin' ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
281 </tr>
282 <?php endif;
283
284 if ( $wpdb->use_mysqli ) {
285 $ver = mysqli_get_server_info( $wpdb->dbh );
286 } else {
287 $ver = mysql_get_server_info();
288 }
289
290 if ( ! empty( $wpdb->is_mysql ) && ! stristr( $ver, 'MariaDB' ) ) : ?>
291 <tr>
292 <td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'give' ); ?>:</td>
293 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of MySQL installed on your hosting server.', 'give' ) ); ?></td>
294 <td>
295 <?php
296 $mysql_version = $wpdb->db_version();
297
298 if ( version_compare( $mysql_version, '5.6', '<' ) ) {
299 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum MySQL version of 5.6. See: %s', 'give' ), esc_html( $mysql_version ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . __( 'WordPress Requirements', 'give' ) . '</a>' ) . '</mark>';
300 } else {
301 echo '<mark class="yes">' . esc_html( $mysql_version ) . '</mark>';
302 }
303 ?>
304 </td>
305 </tr>
306 <?php endif; ?>
307 <tr>
308 <td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'give' ); ?>:</td>
309 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The default timezone for your server.', 'give' ) ); ?></td>
310 <td><?php
311 $default_timezone = date_default_timezone_get();
312 if ( 'UTC' !== $default_timezone ) {
313 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'give' ), $default_timezone ) . '</mark>';
314 } else {
315 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
316 } ?>
317 </td>
318 </tr>
319 <?php
320 $posting = array();
321
322 // fsockopen/cURL.
323 $posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
324 $posting['fsockopen_curl']['help'] = __( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'give' );
325
326 if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
327 $posting['fsockopen_curl']['success'] = true;
328 } else {
329 $posting['fsockopen_curl']['success'] = false;
330 $posting['fsockopen_curl']['note'] = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'give' );
331 }
332
333 // SOAP.
334 $posting['soap_client']['name'] = 'SoapClient';
335 $posting['soap_client']['help'] = __( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'give' );
336
337 if ( class_exists( 'SoapClient' ) ) {
338 $posting['soap_client']['success'] = true;
339 } else {
340 $posting['soap_client']['success'] = false;
341 $posting['soap_client']['note'] = sprintf( __( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'give' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' );
342 }
343
344 // DOMDocument.
345 $posting['dom_document']['name'] = 'DOMDocument';
346 $posting['dom_document']['help'] = __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give' );
347
348 if ( class_exists( 'DOMDocument' ) ) {
349 $posting['dom_document']['success'] = true;
350 } else {
351 $posting['dom_document']['success'] = false;
352 $posting['dom_document']['note'] = sprintf( __( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'give' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' );
353 }
354
355 // gzip.
356 $posting['gzip']['name'] = 'gzip';
357 $posting['gzip']['help'] = __( 'gzip is used for file compression and decompression.', 'give' );
358
359 if ( is_callable( 'gzopen' ) ) {
360 $posting['gzip']['success'] = true;
361 } else {
362 $posting['gzip']['success'] = false;
363 $posting['gzip']['note'] = sprintf( __( 'Your server does not support the %s function - this is used for file compression and decompression.', 'give' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' );
364 }
365
366
367 // GD Graphics Library.
368 $posting['gd']['name'] = 'GD Graphics Library';
369 $posting['gd']['help'] = __( 'GD Graphics Library is used for dynamically manipulating images.', 'give' );
370 $posting['gd']['success'] = extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ? true : false;
371
372 // Multibyte String.
373 $posting['mbstring']['name'] = 'Multibyte String';
374 $posting['mbstring']['help'] = __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give' );
375
376 if ( extension_loaded( 'mbstring' ) ) {
377 $posting['mbstring']['success'] = true;
378 } else {
379 $posting['mbstring']['success'] = false;
380 $posting['mbstring']['note'] = sprintf( __( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'give' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' );
381 }
382
383 // WP Remote Post Check.
384 $posting['wp_remote_post']['name'] = __( 'Remote Post', 'give' );
385 $posting['wp_remote_post']['help'] = __( 'PayPal uses this method of communicating when sending back transaction information.', 'give' );
386
387 $response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
388 'timeout' => 60,
389 'user-agent' => 'Give/' . GIVE_VERSION,
390 'httpversion' => '1.1',
391 'body' => array(
392 'cmd' => '_notify-validate',
393 ),
394 ) );
395
396 if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
397 $posting['wp_remote_post']['success'] = true;
398 } else {
399 $posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give' );
400 if ( is_wp_error( $response ) ) {
401 $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), sanitize_text_field( $response->get_error_message() ) );
402 } else {
403 $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), sanitize_text_field( $response['response']['code'] ) );
404 }
405 $posting['wp_remote_post']['success'] = false;
406 }
407
408 // WP Remote Get Check.
409 $posting['wp_remote_get']['name'] = __( 'Remote Get', 'give' );
410 $posting['wp_remote_get']['help'] = __( 'GiveWP plugins may use this method of communication when checking for plugin updates.', 'give' );
411
412 $response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
413
414 if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
415 $posting['wp_remote_get']['success'] = true;
416 } else {
417 $posting['wp_remote_get']['note'] = __( 'wp_remote_get() failed. The GiveWP plugin updater won\'t work with your server. Contact your hosting provider.', 'give' );
418 if ( is_wp_error( $response ) ) {
419 $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), give_clean( $response->get_error_message() ) );
420 } else {
421 $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), give_clean( $response['response']['code'] ) );
422 }
423 $posting['wp_remote_get']['success'] = false;
424 }
425
426 $posting = apply_filters( 'give_debug_posting', $posting );
427
428 foreach ( $posting as $post ) {
429 $mark = ! empty( $post['success'] ) ? 'yes' : 'error';
430 ?>
431 <tr>
432 <td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
433 <td class="help"><?php echo Give()->tooltips->render_help( esc_attr( isset( $post['help'] ) ? $post['help'] : '' ) ); ?></td>
434 <td>
435 <mark class="<?php echo $mark; ?>">
436 <?php echo ! empty( $post['success'] ) ? '<span class="dashicons dashicons-yes"></span>' : '<span class="dashicons dashicons-no-alt"></span>'; ?> <?php echo ! empty( $post['note'] ) ? wp_kses_data( $post['note'] ) : ''; ?>
437 </mark>
438 </td>
439 </tr>
440 <?php
441 }
442 ?>
443 </tbody>
444 </table>
445
446 <table class="give-status-table widefat" cellspacing="0">
447 <thead>
448 <tr>
449 <th colspan="3" data-export-label="GiveWP Configuration"><h2><?php _e( 'GiveWP Configuration', 'give' ); ?></h2></th>
450 </tr>
451 </thead>
452 <tbody>
453 <tr>
454 <td data-export-label="GiveWP Version"><?php _e( 'GiveWP Version', 'give' ); ?>:</td>
455 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of GiveWP installed on your site.', 'give' ) ); ?></td>
456 <td><?php echo esc_html( get_option( 'give_version' )); ?></td>
457 </tr>
458 <tr>
459 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Cache', 'give' ); ?>:</td>
460 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in GiveWP settings.', 'give' ) ); ?></td>
461 <td><?php echo give_is_setting_enabled( give_get_option('cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
462 </tr>
463 <tr>
464 <td data-export-label="Database Updates"><?php _e( 'Database Updates', 'give' ); ?>:</td>
465 <td class="help"><?php echo Give()->tooltips->render_help( __( 'This will show the number of pending database updates.', 'give' ) ); ?></td>
466 <td>
467 <?php
468 $updates_text = __( 'All DB Updates Completed.', 'give' );
469 $pending_updates = $give_updates->get_total_new_db_update_count();
470 $total_updates = $give_updates->get_total_db_update_count();
471
472 if( Give_Updates::$background_updater->is_paused_process() ) {
473 // When all the db updates are pending.
474 $updates_text = sprintf(
475 __( '%1$s updates still need to run. (Paused) ', 'give' ),
476 count( $give_updates->get_updates('database', 'new' ) )
477 );
478 } elseif( $pending_updates === $total_updates ) {
479
480 // When all the db updates are pending.
481 $updates_text = sprintf(
482 __( '%1$s updates still need to run.', 'give' ),
483 $total_updates
484 );
485 } elseif( $pending_updates > 0 ) {
486
487 // When some of the db updates are completed and some are pending.
488 $updates_text = sprintf(
489 __( '%1$s of %2$s updates still need to run.', 'give' ),
490 $pending_updates,
491 $total_updates
492 );
493 }
494
495 echo $updates_text;
496 ?>
497 </td>
498 </tr>
499 <tr>
500 <td data-export-label="Database Tables"><?php _e( 'Database Tables', 'give' ); ?>:</td>
501 <td class="help"><?php echo Give()->tooltips->render_help( __( 'This will show list of installed database tables.', 'give' ) ); ?></td>
502 <td>
503 <?php
504 $db_table_list = '';
505
506 /* @var Give_DB $table */
507 foreach ( __give_get_tables() as $table ) {
508 $db_table_list .= sprintf(
509 '<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark> %3$s - %4$s</li>',
510 $table->installed()
511 ? 'yes'
512 : 'error',
513 $table->installed()
514 ? 'yes'
515 : 'no-alt',
516 $table->table_name,
517 $table->version
518 );
519 }
520
521 echo "<ul>{$db_table_list}</ul>";
522 ?>
523 </td>
524 </tr>
525 <tr>
526 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Cache', 'give' ); ?>:</td>
527 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in GiveWP settings.', 'give' ) ); ?></td>
528 <td><?php echo give_is_setting_enabled( give_get_option('cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
529 </tr>
530 <tr>
531 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Emails', 'give' ); ?>:</td>
532 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether emails is enabled in GiveWP settings.', 'give' ) ); ?></td>
533 <td>
534 <?php
535 /* @var Give_Email_Notification $email_notification */
536 if( $email_notifications = Give_Email_Notifications::get_instance()->get_email_notifications() ) {
537 ob_start();
538
539 foreach ( Give_Email_Notifications::get_instance()->get_email_notifications() as $email_notification ) {
540 $status = Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ?
541 'yes' :
542 'error';
543
544 echo sprintf(
545 '<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark></span>%3$s</li>',
546 Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'error',
547 Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'no-alt',
548 $email_notification->config['label']
549 );
550 }
551
552 echo sprintf( '<ul>%s</ul>', ob_get_clean() );
553 }
554 ?>
555 </td>
556 </tr>
557 <tr>
558 <td data-export-label="Upgraded From"><?php _e( 'Upgraded From', 'give' ); ?>:</td>
559 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of GiveWP installed prior to the last update.', 'give' ) ); ?></td>
560 <td><?php echo esc_html( get_option( 'give_version_upgraded_from', '&ndash;' ) ); ?></td>
561 </tr>
562 <tr>
563 <td data-export-label="Test Mode"><?php _e( 'Test Mode', 'give' ); ?>:</td>
564 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether Test Mode is enabled in GiveWP settings.', 'give' ) ); ?></td>
565 <td><?php echo give_is_test_mode() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
566 </tr>
567 <tr>
568 <td data-export-label="Currency Code"><?php _e( 'Currency Code', 'give' ); ?>:</td>
569 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency code selected in GiveWP settings.', 'give' ) ); ?></td>
570 <td><?php echo esc_html( give_get_currency() ); ?></td>
571 </tr>
572 <tr>
573 <td data-export-label="Currency Position"><?php _e( 'Currency Position', 'give' ); ?>:</td>
574 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency position selected in GiveWP settings.', 'give' ) ); ?></td>
575 <td><?php echo 'before' === give_get_option( 'currency_position' ) ? __( 'Before', 'give' ) : __( 'After', 'give' ); ?></td>
576 </tr>
577 <tr>
578 <td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'give' ); ?>:</td>
579 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The decimal separator defined in GiveWP settings.', 'give' ) ); ?></td>
580 <td><?php echo esc_html( give_get_price_decimal_separator() ); ?></td>
581 </tr>
582 <tr>
583 <td data-export-label="Thousands Separator"><?php _e( 'Thousands Separator', 'give' ); ?>:</td>
584 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The thousands separator defined in GiveWP settings.', 'give' ) ); ?></td>
585 <td><?php echo esc_html( give_get_price_thousand_separator() ); ?></td>
586 </tr>
587 <tr>
588 <td data-export-label="Success Page"><?php _e( 'Success Page', 'give' ); ?>:</td>
589 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a successful transaction.', 'give' ) ); ?></td>
590 <td><?php echo ! empty( $give_options['success_page'] ) ? esc_url( get_permalink( $give_options['success_page'] ) ) : '&ndash;'; ?></td>
591 </tr>
592 <tr>
593 <td data-export-label="Failure Page"><?php _e( 'Failure Page', 'give' ); ?>:</td>
594 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a failed transaction.', 'give' ) ); ?></td>
595 <td><?php echo ! empty( $give_options['failure_page'] ) ? esc_url( get_permalink( $give_options['failure_page'] ) ) : '&ndash;'; ?></td>
596 </tr>
597 <tr>
598 <td data-export-label="Donation History Page"><?php _e( 'Donation History Page', 'give' ); ?>:</td>
599 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where past donations are listed.', 'give' ) ); ?></td>
600 <td><?php echo ! empty( $give_options['history_page'] ) ? esc_url( get_permalink( $give_options['history_page'] ) ) : '&ndash;'; ?></td>
601 </tr>
602 <tr>
603 <td data-export-label="GiveWP Forms Slug"><?php _e( 'GiveWP Forms Slug', 'give' ); ?>:</td>
604 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The slug used for GiveWP donation forms.', 'give' ) ); ?></td>
605 <td><?php echo esc_html( defined( 'GIVE_SLUG' ) ? '/' . GIVE_SLUG . '/' : '/donations/' ); ?></td>
606 </tr>
607 <?php
608 $active_gateways = give_get_enabled_payment_gateways();
609 $enabled_gateways = $default_gateway = '';
610
611 if ( $active_gateways ) {
612 $default_gateway_is_active = give_is_gateway_active( give_get_default_gateway( null ) );
613
614 if ( $default_gateway_is_active ) {
615 $default_gateway = give_get_default_gateway( null );
616 $default_gateway = $active_gateways[ $default_gateway ]['admin_label'];
617 } else {
618 $default_gateway = __( 'Test Donation', 'give' );
619 }
620
621 $gateways = array();
622
623 foreach ( $active_gateways as $gateway ) {
624 $gateways[] = $gateway['admin_label'];
625 }
626
627 $enabled_gateways = implode( ', ', $gateways );
628 }
629 ?>
630 <tr>
631 <td data-export-label="Enabled Payment Gateways"><?php _e( 'Enabled Payment Gateways', 'give' ); ?>:</td>
632 <td class="help"><?php echo Give()->tooltips->render_help( __( 'All payment gateways enabled in GiveWP settings.', 'give' ) ); ?></td>
633 <td><?php echo esc_html( ! empty( $enabled_gateways ) ? $enabled_gateways : '&ndash;' ); ?></td>
634 </tr>
635 <tr>
636 <td data-export-label="Default Payment Gateway"><?php _e( 'Default Payment Gateway', 'give' ); ?>:</td>
637 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The default payment gateway selected in GiveWP settings.', 'give' ) ); ?></td>
638 <td><?php echo esc_html( ! empty( $default_gateway ) ? $default_gateway : '&ndash;' ); ?></td>
639 </tr>
640 <tr>
641 <td data-export-label="PayPal IPN Verification"><?php _e( 'PayPal IPN Verification', 'give' ); ?>:</td>
642 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether admins requires verification of IPN notifications with PayPal.', 'give' ) ); ?></td>
643 <td><?php echo 'enabled' === give_get_option( 'paypal_verification' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
644 </tr>
645 <tr>
646 <td data-export-label="PayPal IPN Notifications"><?php _e( 'PayPal IPN Notifications', 'give' ); ?>:</td>
647 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether when last PayPal IPN is received with which donation or transaction.', 'give' ) ); ?></td>
648 <td>
649 <?php
650 $last_paypal_ipn_received = get_option( 'give_last_paypal_ipn_received' );
651 $donation_id = $last_paypal_ipn_received['payment_id'];
652 if (
653 is_array( $last_paypal_ipn_received )
654 && count( $last_paypal_ipn_received ) > 0
655 && get_post( $donation_id ) instanceof WP_Post
656 ) {
657 $ipn_timestamp = give_get_meta( $donation_id, 'give_last_paypal_ipn_received', true );
658 $transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id=' . $last_paypal_ipn_received['transaction_id'];
659 $donation_url = site_url() . '/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $donation_id;
660 echo sprintf(
661 __( 'IPN received for <a href="%s">#%s</a> ( <a href="%s" target="_blank">%s</a> ) on %s at %s. Status %s', 'give' ),
662 $donation_url,
663 $donation_id,
664 $transaction_url,
665 $last_paypal_ipn_received['transaction_id'],
666 date_i18n( 'm/d/Y', $ipn_timestamp ),
667 date_i18n( 'H:i', $ipn_timestamp ),
668 $last_paypal_ipn_received['auth_status']
669 );
670 } else {
671 echo 'N/A';
672 }
673 ?>
674 </td>
675 </tr>
676 <tr>
677 <td data-export-label="Donor Email Access"><?php _e( 'Donor Email Access', 'give' ); ?>:</td>
678 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether donors can access their donation history using only email.', 'give' ) ); ?></td>
679 <td><?php echo 'enabled' === give_get_option( 'email_access' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
680 </tr>
681 <tr>
682 <td data-export-label="Stripe Webhook Notifications"><?php _e( 'Stripe Webhook Notifications', 'give' ); ?>:</td>
683 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether when last Stripe Webhook is received with which donation or transaction.', 'give' ) ); ?></td>
684 <td>
685 <?php
686 $webhook_received_on = give_get_option( 'give_stripe_last_webhook_received_timestamp' );
687 if ( ! empty( $webhook_received_on ) ) {
688 $date_time_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
689 echo date_i18n( esc_html( $date_time_format ), $webhook_received_on );
690 } else {
691 echo 'N/A';
692 }
693 ?>
694 </td>
695 </tr>
696 </tbody>
697 </table>
698
699 <table class="give-status-table widefat" cellspacing="0">
700 <thead>
701 <tr>
702 <th colspan="3" data-export-label="Active GiveWP Add-ons"><h2><?php _e( 'Active GiveWP Add-ons', 'give' ); ?></h2></th>
703 </tr>
704 </thead>
705 <tbody>
706 <?php
707 foreach ( $give_add_ons as $plugin_data ) {
708 // Only show Give Core Activated Add-Ons.
709 if (
710 'active' !== $plugin_data['Status']
711 || false !== strpos( $plugin_data['Name'], 'GiveWP - Donation Plugin' )
712 ) {
713 continue;
714 }
715
716 $plugin_name = $plugin_data['Name'];
717 $author_name = $plugin_data['Author'];
718
719 // Link the plugin name to the plugin URL if available.
720 if ( ! empty( $plugin_data['PluginURI'] ) ) {
721 $plugin_name = sprintf(
722 '<a href="%s" title="%s">%s</a>',
723 esc_url( $plugin_data['PluginURI'] ),
724 esc_attr__( 'Visit plugin homepage', 'give' ),
725 $plugin_name
726 );
727 }
728
729 // Link the author name to the author URL if available.
730 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
731 $author_name = sprintf(
732 '<a href="%s" title="%s">%s</a>',
733 esc_url( $plugin_data['AuthorURI'] ),
734 esc_attr__( 'Visit author homepage', 'give' ),
735 $author_name
736 );
737 }
738 ?>
739 <tr>
740 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
741 <td class="help">&nbsp;</td>
742 <td>
743 <?php
744 if ( isset( $plugin_data['License'] ) && true === $plugin_data['License'] ) {
745 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> ' . __( 'Licensed', 'give' );
746 } else {
747 echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> ' . __( 'Unlicensed', 'give' );
748 }
749
750 echo ' &ndash; '
751 . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
752 . ' &ndash; '
753 . esc_html( $plugin_data['Version'] );
754 ?>
755 </td>
756 </tr>
757 <?php
758 }
759 ?>
760 </tbody>
761 </table>
762
763 <table class="give-status-table widefat" cellspacing="0">
764 <thead>
765 <tr>
766 <th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e( 'Other Active Plugins', 'give' ); ?></h2></th>
767 </tr>
768 </thead>
769 <tbody>
770 <?php
771 foreach ( $plugins as $plugin_data ) {
772 // Do not show Give Core and it's Add-On plugins.
773 if (
774 'active' !== $plugin_data['Status']
775 || in_array( $plugin_data['AuthorName'], $give_plugin_authors )
776 || false !== strpos( $plugin_data['PluginURI'], 'givewp.com' )
777 ) {
778 continue;
779 }
780
781 $plugin_name = $plugin_data['Name'];
782 $author_name = $plugin_data['Author'];
783
784 // Link the plugin name to the plugin URL if available.
785 if ( ! empty( $plugin_data['PluginURI'] ) ) {
786 $plugin_name = sprintf(
787 '<a href="%s" title="%s">%s</a>',
788 esc_url( $plugin_data['PluginURI'] ),
789 esc_attr__( 'Visit plugin homepage', 'give' ),
790 $plugin_name
791 );
792 }
793
794 // Link the author name to the author URL if available.
795 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
796 $author_name = sprintf(
797 '<a href="%s" title="%s">%s</a>',
798 esc_url( $plugin_data['AuthorURI'] ),
799 esc_attr__( 'Visit author homepage', 'give' ),
800 $author_name
801 );
802 }
803 ?>
804 <tr>
805 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
806 <td class="help">&nbsp;</td>
807 <td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) ) . ' &ndash; ' . esc_html( $plugin_data['Version'] ); ?></td>
808 </tr>
809 <?php
810 }
811 ?>
812 </tbody>
813 </table>
814
815 <table class="give-status-table widefat" cellspacing="0">
816 <thead>
817 <tr>
818 <th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e( 'Inactive Plugins', 'give' ); ?></h2></th>
819 </tr>
820 </thead>
821 <tbody>
822 <?php
823 foreach ( $plugins as $plugin_data ) {
824 if ( 'inactive' !== $plugin_data['Status'] ) {
825 continue;
826 }
827
828 $plugin_name = $plugin_data['Name'];
829 $author_name = $plugin_data['Author'];
830
831 // Link the plugin name to the plugin URL if available.
832 if ( ! empty( $plugin_data['PluginURI'] ) ) {
833 $plugin_name = sprintf(
834 '<a href="%s" title="%s">%s</a>',
835 esc_url( $plugin_data['PluginURI'] ),
836 esc_attr__( 'Visit plugin homepage', 'give' ),
837 $plugin_name
838 );
839 }
840
841 // Link the author name to the author URL if available.
842 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
843 $author_name = sprintf(
844 '<a href="%s" title="%s">%s</a>',
845 esc_url( $plugin_data['AuthorURI'] ),
846 esc_attr__( 'Visit author homepage', 'give' ),
847 $author_name
848 );
849 }
850 ?>
851 <tr>
852 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
853 <td class="help">&nbsp;</td>
854 <td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) ) . ' &ndash; ' . esc_html( $plugin_data['Version'] ); ?></td>
855 </tr>
856 <?php
857 }
858 ?>
859 </tbody>
860 </table>
861
862 <?php
863 $active_mu_plugins = (array) get_mu_plugins();
864 if ( ! empty( $active_mu_plugins ) ) {
865 ?>
866 <table class="give-status-table widefat" cellspacing="0">
867 <thead>
868 <tr>
869 <th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e( 'Active MU Plugins', 'give' ); ?></h2></th>
870 </tr>
871 </thead>
872 <tbody>
873 <?php
874
875 foreach ( $active_mu_plugins as $mu_plugin_data ) {
876 if ( ! empty( $mu_plugin_data['Name'] ) ) {
877 // Link the plugin name to the plugin URL if available.
878 $plugin_name = esc_html( $mu_plugin_data['Name'] );
879
880 if ( ! empty( $mu_plugin_data['PluginURI'] ) ) {
881 $plugin_name = sprintf(
882 '<a href="%s" title="%s">%s</a>',
883 esc_url( $mu_plugin_data['PluginURI'] ),
884 esc_attr__( 'Visit plugin homepage', 'give' ),
885 $plugin_name
886 );
887 }
888
889 // Link the author name to the author URL if available.
890 $author_name = esc_html( $mu_plugin_data['Author'] );
891
892 if ( ! empty( $mu_plugin_data['AuthorURI'] ) ) {
893 $author_name = sprintf(
894 '<a href="%s">%s</a>',
895 esc_url( $mu_plugin_data['AuthorURI'] ),
896 $author_name
897 );
898 }
899 ?>
900 <tr>
901 <td><?php echo $plugin_name; ?></td>
902 <td class="help">&nbsp;</td>
903 <td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), $author_name ) . ' &ndash; ' . esc_html( $mu_plugin_data['Version'] ); ?></td>
904 </tr>
905 <?php
906 }
907 }
908 ?>
909 </tbody>
910 </table>
911 <?php } ?>
912
913 <table class="give-status-table widefat" cellspacing="0">
914 <thead>
915 <tr>
916 <th colspan="3" data-export-label="Theme"><h2><?php _e( 'Theme', 'give' ); ?></h2></th>
917 </tr>
918 </thead>
919 <?php
920 include_once( ABSPATH . 'wp-admin/includes/theme-install.php' );
921 $active_theme = wp_get_theme();
922 ?>
923 <tbody>
924 <tr>
925 <td data-export-label="Name"><?php _e( 'Name', 'give' ); ?>:</td>
926 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the current active theme.', 'give' ) ); ?></td>
927 <td><?php echo esc_html( $active_theme->Name ); ?></td>
928 </tr>
929 <tr>
930 <td data-export-label="Version"><?php _e( 'Version', 'give' ); ?>:</td>
931 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the current active theme.', 'give' ) ); ?></td>
932 <td><?php echo esc_html( $active_theme->Version ); ?></td>
933 </tr>
934 <tr>
935 <td data-export-label="Author URL"><?php _e( 'Author URL', 'give' ); ?>:</td>
936 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The theme developer\'s URL.', 'give' ) ); ?></td>
937 <td><?php echo $active_theme->{'Author URI'}; ?></td>
938 </tr>
939 <tr>
940 <td data-export-label="Child Theme"><?php _e( 'Child Theme', 'give' ); ?>:</td>
941 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether the current theme is a child theme.', 'give' ) ); ?></td>
942 <td><?php
943 echo is_child_theme() ? __( 'Yes', 'give' ) : __( 'No', 'give' ) . ' &ndash; ' . sprintf( __( 'If you\'re modifying GiveWP on a parent theme you didn\'t build personally, then we recommend using a child theme. See: <a href="%s" target="_blank">How to Create a Child Theme</a>', 'give' ), 'https://codex.wordpress.org/Child_Themes' );
944 ?></td>
945 </tr>
946 <?php
947 if( is_child_theme() ) {
948 $parent_theme = wp_get_theme( $active_theme->Template );
949 ?>
950 <tr>
951 <td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'give' ); ?>:</td>
952 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the parent theme.', 'give' ) ); ?></td>
953 <td><?php echo esc_html( $parent_theme->Name ); ?></td>
954 </tr>
955 <tr>
956 <td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'give' ); ?>:</td>
957 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the parent theme.', 'give' ) ); ?></td>
958 <td><?php echo esc_html( $parent_theme->Version ); ?></td>
959 </tr>
960 <tr>
961 <td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'give' ); ?>:</td>
962 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The parent theme developers URL.', 'give' ) ); ?></td>
963 <td><?php echo $parent_theme->{'Author URI'}; ?></td>
964 </tr>
965 <?php } ?>
966 </tbody>
967 </table>
968
969 <script type="text/javascript">
970 jQuery('.js-give-debug-report-button').click(function () {
971 var report = '';
972 var first_row = true;
973
974 jQuery('.give-status-table thead, .give-status-table tbody').each(function () {
975 if (jQuery(this).is('thead')) {
976
977 var label = jQuery(this).find('th:eq(0)').data('export-label') || jQuery(this).text();
978
979 if (true === first_row) {
980 report = '### ' + jQuery.trim(label) + ' ###\n\n';
981 first_row = false;
982 } else {
983 report = report + '\n### ' + jQuery.trim(label) + ' ###\n\n';
984 }
985 } else {
986
987 jQuery('tr', jQuery(this)).each(function () {
988
989 var label = jQuery(this).find('td:eq(0)').data('export-label') || jQuery(this).find('td:eq(0)').text();
990 var the_name = jQuery.trim(label).replace(/(<([^>]+)>)/ig, ''); // Remove HTML.
991
992 // Find value
993 var $value_html = jQuery(this).find('td:eq(2)').clone();
994 $value_html.find('.private').remove();
995 $value_html.find('.dashicons-yes').replaceWith('&#10004;');
996 $value_html.find('.dashicons-no-alt, .dashicons-warning').replaceWith('&#10060;');
997
998 // Format value
999 var the_value = jQuery.trim($value_html.text());
1000 // var value_array = the_value.split( ', ' );
1001 //
1002 // if ( value_array.length > 1 ) {
1003 // // If value have a list of plugins ','.
1004 // // Split to add new line.
1005 // var temp_line ='';
1006 // jQuery.each( value_array, function( key, line ) {
1007 // temp_line = temp_line + line + '\n';
1008 // });
1009 //
1010 // the_value = temp_line;
1011 // }
1012
1013 report = report + '' + the_name + ': ' + the_value + '\n';
1014 });
1015
1016 }
1017 });
1018
1019 try {
1020 jQuery('.js-give-debug-report').slideDown();
1021 jQuery('.js-give-debug-report').find('textarea').val(report).focus().select();
1022 jQuery(this).hide();
1023 return false;
1024 } catch (e) {
1025 /* jshint devel: true */
1026 console.log(e);
1027 }
1028
1029 return false;
1030 });
1031 </script>
1032