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