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