PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 2.10.1
GiveWP – Donation Plugin and Fundraising Platform v2.10.1
4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / includes / admin / tools / views / html-admin-page-system-info.php
give / includes / admin / tools / views Last commit date
html-admin-page-data.php 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
1094 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 = file_get_contents( 'https://www.howsmyssl.com/a/check' );
207 }
208
209 if ( false !== $tls_check ) {
210 $tls_check = json_decode( $tls_check );
211 /* translators: %s: SSL connection response */
212 printf( __( 'Connection uses %s', 'give' ), esc_html( $tls_check->tls_version ) );
213 }
214 ?>
215 </td>
216 </tr>
217 <tr>
218 <td data-export-label="TLS Connection"><?php _e( 'TLS Rating', 'give' ); ?>:</td>
219 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The server\'s connection as rated by https://www.howsmyssl.com/', 'give' ) ); ?></td>
220 <td>
221 <?php
222 if ( false !== $tls_check ) {
223 esc_html_e( property_exists( $tls_check, 'rating' ) ? $tls_check->rating : $tls_check->tls_version, 'give' );
224 }
225 ?>
226 </td>
227 </tr>
228 <tr>
229 <td data-export-label="Server Info"><?php _e( 'Server Info', 'give' ); ?>:</td>
230 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Information about the web server that is currently hosting your site.', 'give' ) ); ?></td>
231 <td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
232 </tr>
233 <tr>
234 <td data-export-label="PHP Version"><?php _e( 'PHP Version', 'give' ); ?>:</td>
235 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of PHP installed on your hosting server.', 'give' ) ); ?></td>
236 <td>
237 <?php
238 // Check if phpversion function exists.
239 if ( function_exists( 'phpversion' ) ) {
240 $php_version = phpversion();
241
242 if ( version_compare( $php_version, '5.6', '<' ) ) {
243 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>';
244 } else {
245 echo '<mark class="yes">' . esc_html( $php_version ) . '</mark>';
246 }
247 } else {
248 _e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'give' );
249 }
250 ?>
251 </td>
252 </tr>
253 <?php if ( function_exists( 'ini_get' ) ) : ?>
254 <tr>
255 <td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'give' ); ?>:</td>
256 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be contained in one post.', 'give' ) ); ?></td>
257 <td><?php echo size_format( give_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
258 </tr>
259 <tr>
260 <td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'give' ); ?>:</td>
261 <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>
262 <td><?php echo ini_get( 'max_execution_time' ); ?></td>
263 </tr>
264 <tr>
265 <td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'give' ); ?>:</td>
266 <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>
267 <td><?php echo ini_get( 'max_input_vars' ); ?></td>
268 </tr>
269 <tr>
270 <td data-export-label="PHP Max Upload Size"><?php _e( 'PHP Max Upload Size', 'give' ); ?>:</td>
271 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The largest filesize that can be uploaded to your WordPress installation.', 'give' ) ); ?></td>
272 <td><?php echo size_format( wp_max_upload_size() ); ?></td>
273 </tr>
274 <tr>
275 <td data-export-label="cURL Version"><?php _e( 'cURL Version', 'give' ); ?>:</td>
276 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of cURL installed on your server.', 'give' ) ); ?></td>
277 <td>
278 <?php
279 if ( function_exists( 'curl_version' ) ) {
280 $curl_version = curl_version();
281
282 if ( version_compare( $curl_version['version'], '7.40', '<' ) ) {
283 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>';
284 } else {
285 echo '<mark class="yes">' . esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) . '</mark>';
286 }
287 } else {
288 echo '&ndash';
289 }
290 ?>
291 </td>
292 </tr>
293 <tr>
294 <td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'give' ); ?>:</td>
295 <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>
296 <td><?php echo extension_loaded( 'suhosin' ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
297 </tr>
298 <?php
299 endif;
300
301 if ( $wpdb->use_mysqli ) {
302 $ver = mysqli_get_server_info( $wpdb->dbh );
303 } else {
304 $ver = mysql_get_server_info();
305 }
306
307 if ( ! empty( $wpdb->is_mysql ) && ! stristr( $ver, 'MariaDB' ) ) :
308 ?>
309 <tr>
310 <td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'give' ); ?>:</td>
311 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of MySQL installed on your hosting server.', 'give' ) ); ?></td>
312 <td>
313 <?php
314 $mysql_version = $wpdb->db_version();
315
316 if ( version_compare( $mysql_version, '5.6', '<' ) ) {
317 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>';
318 } else {
319 echo '<mark class="yes">' . esc_html( $mysql_version ) . '</mark>';
320 }
321 ?>
322 </td>
323 </tr>
324 <?php endif; ?>
325 <tr>
326 <td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'give' ); ?>:</td>
327 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The default timezone for your server.', 'give' ) ); ?></td>
328 <td>
329 <?php
330 $default_timezone = date_default_timezone_get();
331 if ( 'UTC' !== $default_timezone ) {
332 echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'give' ), $default_timezone ) . '</mark>';
333 } else {
334 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
335 }
336 ?>
337 </td>
338 </tr>
339 <?php
340 $posting = [];
341
342 // fsockopen/cURL.
343 $posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
344 $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' );
345
346 if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
347 $posting['fsockopen_curl']['success'] = true;
348 } else {
349 $posting['fsockopen_curl']['success'] = false;
350 $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' );
351 }
352
353 // SOAP.
354 $posting['soap_client']['name'] = 'SoapClient';
355 $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' );
356
357 if ( class_exists( 'SoapClient' ) ) {
358 $posting['soap_client']['success'] = true;
359 } else {
360 $posting['soap_client']['success'] = false;
361 $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>' );
362 }
363
364 // DOMDocument.
365 $posting['dom_document']['name'] = 'DOMDocument';
366 $posting['dom_document']['help'] = __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give' );
367
368 if ( class_exists( 'DOMDocument' ) ) {
369 $posting['dom_document']['success'] = true;
370 } else {
371 $posting['dom_document']['success'] = false;
372 $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>' );
373 }
374
375 // gzip.
376 $posting['gzip']['name'] = 'gzip';
377 $posting['gzip']['help'] = __( 'gzip is used for file compression and decompression.', 'give' );
378
379 if ( is_callable( 'gzopen' ) ) {
380 $posting['gzip']['success'] = true;
381 } else {
382 $posting['gzip']['success'] = false;
383 $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>' );
384 }
385
386
387 // GD Graphics Library.
388 $posting['gd']['name'] = 'GD Graphics Library';
389 $posting['gd']['help'] = __( 'GD Graphics Library is used for dynamically manipulating images.', 'give' );
390 $posting['gd']['success'] = extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ? true : false;
391
392 // Multibyte String.
393 $posting['mbstring']['name'] = 'Multibyte String';
394 $posting['mbstring']['help'] = __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give' );
395
396 if ( extension_loaded( 'mbstring' ) ) {
397 $posting['mbstring']['success'] = true;
398 } else {
399 $posting['mbstring']['success'] = false;
400 $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>' );
401 }
402
403 // WP Remote Post Check.
404 $posting['wp_remote_post']['name'] = __( 'Remote Post', 'give' );
405 $posting['wp_remote_post']['help'] = __( 'PayPal uses this method of communicating when sending back transaction information.', 'give' );
406
407 $response = wp_safe_remote_post(
408 'https://www.paypal.com/cgi-bin/webscr',
409 [
410 'timeout' => 60,
411 'user-agent' => 'Give/' . GIVE_VERSION,
412 'httpversion' => '1.1',
413 'body' => [
414 'cmd' => '_notify-validate',
415 ],
416 ]
417 );
418
419 if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
420 $posting['wp_remote_post']['success'] = true;
421 } else {
422 $posting['wp_remote_post']['note'] = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give' );
423 if ( is_wp_error( $response ) ) {
424 $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), sanitize_text_field( $response->get_error_message() ) );
425 } else {
426 $posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), sanitize_text_field( $response['response']['code'] ) );
427 }
428 $posting['wp_remote_post']['success'] = false;
429 }
430
431 // WP Remote Get Check.
432 $posting['wp_remote_get']['name'] = __( 'Remote Get', 'give' );
433 $posting['wp_remote_get']['help'] = __( 'GiveWP plugins may use this method of communication when checking for plugin updates.', 'give' );
434
435 $response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
436
437 if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
438 $posting['wp_remote_get']['success'] = true;
439 } else {
440 $posting['wp_remote_get']['note'] = __( 'wp_remote_get() failed. The GiveWP plugin updater won\'t work with your server. Contact your hosting provider.', 'give' );
441 if ( is_wp_error( $response ) ) {
442 $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), give_clean( $response->get_error_message() ) );
443 } else {
444 $posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), give_clean( $response['response']['code'] ) );
445 }
446 $posting['wp_remote_get']['success'] = false;
447 }
448
449 $posting = apply_filters( 'give_debug_posting', $posting );
450
451 foreach ( $posting as $post ) {
452 $mark = ! empty( $post['success'] ) ? 'yes' : 'error';
453 ?>
454 <tr>
455 <td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
456 <td class="help"><?php echo Give()->tooltips->render_help( esc_attr( isset( $post['help'] ) ? $post['help'] : '' ) ); ?></td>
457 <td>
458 <mark class="<?php echo $mark; ?>">
459 <?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'] ) : ''; ?>
460 </mark>
461 </td>
462 </tr>
463 <?php
464 }
465 ?>
466 </tbody>
467 </table>
468
469 <table class="give-status-table widefat" cellspacing="0">
470 <thead>
471 <tr>
472 <th colspan="3" data-export-label="GiveWP Configuration"><h2><?php _e( 'GiveWP Configuration', 'give' ); ?></h2>
473 </th>
474 </tr>
475 </thead>
476 <tbody>
477 <tr>
478 <td data-export-label="GiveWP Version"><?php _e( 'GiveWP Version', 'give' ); ?>:</td>
479 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of GiveWP installed on your site.', 'give' ) ); ?></td>
480 <td><?php echo esc_html( get_option( 'give_version' ) ); ?></td>
481 </tr>
482 <tr>
483 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Cache', 'give' ); ?>:</td>
484 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in GiveWP settings.', 'give' ) ); ?></td>
485 <td><?php echo give_is_setting_enabled( give_get_option( 'cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
486 </tr>
487 <tr>
488 <td data-export-label="Database Updates"><?php _e( 'Database Updates', 'give' ); ?>:</td>
489 <td class="help"><?php echo Give()->tooltips->render_help( __( 'This will show the number of pending database updates.', 'give' ) ); ?></td>
490 <td>
491 <?php
492 $updates_text = __( 'All DB Updates Completed.', 'give' );
493 $pending_updates = $give_updates->get_total_new_db_update_count();
494 $total_updates = $give_updates->get_total_db_update_count();
495
496 if ( Give_Updates::$background_updater->is_paused_process() ) {
497 // When all the db updates are pending.
498 $updates_text = sprintf(
499 __( '%1$s updates still need to run. (Paused) ', 'give' ),
500 count( $give_updates->get_updates( 'database', 'new' ) )
501 );
502 } elseif ( $pending_updates === $total_updates ) {
503
504 // When all the db updates are pending.
505 $updates_text = sprintf(
506 __( '%1$s updates still need to run.', 'give' ),
507 $total_updates
508 );
509 } elseif ( $pending_updates > 0 ) {
510
511 // When some of the db updates are completed and some are pending.
512 $updates_text = sprintf(
513 __( '%1$s of %2$s updates still need to run.', 'give' ),
514 $pending_updates,
515 $total_updates
516 );
517 }
518
519 echo $updates_text;
520 ?>
521 </td>
522 </tr>
523 <tr>
524 <td data-export-label="Database Updates"><?php _e( 'Database Migrations', 'give' ); ?>:</td>
525 <td class="help"><?php echo Give()->tooltips->render_help( __( 'This will inform you whether database migration completed or not.', 'give' ) ); ?></td>
526 <td>
527 <?php
528 /* @var MigrationsRunner $migrationRunner */
529 $migrationRunner = give( MigrationsRunner::class );
530
531 echo $migrationRunner->hasMigrationToRun() ?
532 esc_html__( 'Few Database Migrations still need to run.', 'give' ) :
533 esc_html__( 'All Database Migrations Completed.', 'give' );
534 ?>
535 </td>
536 </tr>
537 <tr>
538 <td data-export-label="Database Tables"><?php _e( 'Database Tables', 'give' ); ?>:</td>
539 <td class="help"><?php echo Give()->tooltips->render_help( __( 'This will show list of installed database tables.', 'give' ) ); ?></td>
540 <td>
541 <?php
542 $db_table_list = '';
543
544 /* @var Give_DB $table */
545 foreach ( __give_get_tables() as $table ) {
546 $db_table_list .= sprintf(
547 '<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark> %3$s</li>',
548 $table->installed()
549 ? 'yes'
550 : 'error',
551 $table->installed()
552 ? 'yes'
553 : 'no-alt',
554 $table->table_name
555 );
556 }
557
558 $isRevenueTableExist = Table::tableExists( Table::prefixTableName( 'give_revenue' ) );
559 $db_table_list .= sprintf(
560 '<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark> %3$s</li>',
561 $isRevenueTableExist ? 'yes' : 'error',
562 $isRevenueTableExist ? 'yes' : 'no-alt',
563 Table::prefixTableName( 'give_revenue' )
564 );
565
566 echo "<ul>{$db_table_list}</ul>";
567 ?>
568 </td>
569 </tr>
570 <tr>
571 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Cache', 'give' ); ?>:</td>
572 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether cache is enabled in GiveWP settings.', 'give' ) ); ?></td>
573 <td><?php echo give_is_setting_enabled( give_get_option( 'cache', 'enabled' ) ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
574 </tr>
575 <tr>
576 <td data-export-label="GiveWP Cache"><?php _e( 'GiveWP Emails', 'give' ); ?>:</td>
577 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether emails is enabled in GiveWP settings.', 'give' ) ); ?></td>
578 <td>
579 <?php
580 /* @var Give_Email_Notification $email_notification */
581 if ( $email_notifications = Give_Email_Notifications::get_instance()->get_email_notifications() ) {
582 ob_start();
583
584 foreach ( Give_Email_Notifications::get_instance()->get_email_notifications() as $email_notification ) {
585 $status = Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ?
586 'yes' :
587 'error';
588
589 echo sprintf(
590 '<li><mark class="%1$s"><span class="dashicons dashicons-%2$s"></mark></span>%3$s</li>',
591 Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'error',
592 Give_Email_Notification_Util::is_email_notification_active( $email_notification ) ? 'yes' : 'no-alt',
593 $email_notification->config['label']
594 );
595 }
596
597 echo sprintf( '<ul>%s</ul>', ob_get_clean() );
598 }
599 ?>
600 </td>
601 </tr>
602 <tr>
603 <td data-export-label="Upgraded From"><?php _e( 'Upgraded From', 'give' ); ?>:</td>
604 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The version of GiveWP installed prior to the last update.', 'give' ) ); ?></td>
605 <td><?php echo esc_html( get_option( 'give_version_upgraded_from', '&ndash;' ) ); ?></td>
606 </tr>
607 <tr>
608 <td data-export-label="Test Mode"><?php _e( 'Test Mode', 'give' ); ?>:</td>
609 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether Test Mode is enabled in GiveWP settings.', 'give' ) ); ?></td>
610 <td><?php echo give_is_test_mode() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
611 </tr>
612 <tr>
613 <td data-export-label="Currency Code"><?php _e( 'Currency Code', 'give' ); ?>:</td>
614 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency code selected in GiveWP settings.', 'give' ) ); ?></td>
615 <td><?php echo esc_html( give_get_currency() ); ?></td>
616 </tr>
617 <tr>
618 <td data-export-label="Currency Position"><?php _e( 'Currency Position', 'give' ); ?>:</td>
619 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The currency position selected in GiveWP settings.', 'give' ) ); ?></td>
620 <td><?php echo 'before' === give_get_option( 'currency_position' ) ? __( 'Before', 'give' ) : __( 'After', 'give' ); ?></td>
621 </tr>
622 <tr>
623 <td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'give' ); ?>:</td>
624 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The decimal separator defined in GiveWP settings.', 'give' ) ); ?></td>
625 <td><?php echo esc_html( give_get_price_decimal_separator() ); ?></td>
626 </tr>
627 <tr>
628 <td data-export-label="Thousands Separator"><?php _e( 'Thousands Separator', 'give' ); ?>:</td>
629 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The thousands separator defined in GiveWP settings.', 'give' ) ); ?></td>
630 <td><?php echo esc_html( give_get_price_thousand_separator() ); ?></td>
631 </tr>
632 <tr>
633 <td data-export-label="Success Page"><?php _e( 'Success Page', 'give' ); ?>:</td>
634 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a successful transaction.', 'give' ) ); ?></td>
635 <td><?php echo ! empty( $give_options['success_page'] ) ? esc_url( get_permalink( $give_options['success_page'] ) ) : '&ndash;'; ?></td>
636 </tr>
637 <tr>
638 <td data-export-label="Failure Page"><?php _e( 'Failure Page', 'give' ); ?>:</td>
639 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where donors land following a failed transaction.', 'give' ) ); ?></td>
640 <td><?php echo ! empty( $give_options['failure_page'] ) ? esc_url( get_permalink( $give_options['failure_page'] ) ) : '&ndash;'; ?></td>
641 </tr>
642 <tr>
643 <td data-export-label="Donation History Page"><?php _e( 'Donation History Page', 'give' ); ?>:</td>
644 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The page where past donations are listed.', 'give' ) ); ?></td>
645 <td><?php echo ! empty( $give_options['history_page'] ) ? esc_url( get_permalink( $give_options['history_page'] ) ) : '&ndash;'; ?></td>
646 </tr>
647 <tr>
648 <td data-export-label="GiveWP Forms Slug"><?php _e( 'GiveWP Forms Slug', 'give' ); ?>:</td>
649 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The slug used for GiveWP donation forms.', 'give' ) ); ?></td>
650 <td><?php echo esc_html( defined( 'GIVE_SLUG' ) ? '/' . GIVE_SLUG . '/' : '/donations/' ); ?></td>
651 </tr>
652 <?php
653 $active_gateways = give_get_enabled_payment_gateways();
654 $enabled_gateways = $default_gateway = '';
655
656 if ( $active_gateways ) {
657 $default_gateway_is_active = give_is_gateway_active( give_get_default_gateway( null ) );
658
659 if ( $default_gateway_is_active ) {
660 $default_gateway = give_get_default_gateway( null );
661 $default_gateway = $active_gateways[ $default_gateway ]['admin_label'];
662 } else {
663 $default_gateway = __( 'Test Donation', 'give' );
664 }
665
666 $gateways = [];
667
668 foreach ( $active_gateways as $gateway ) {
669 $gateways[] = $gateway['admin_label'];
670 }
671
672 $enabled_gateways = implode( ', ', $gateways );
673 }
674 ?>
675 <tr>
676 <td data-export-label="Enabled Payment Gateways"><?php _e( 'Enabled Payment Gateways', 'give' ); ?>:</td>
677 <td class="help"><?php echo Give()->tooltips->render_help( __( 'All payment gateways enabled in GiveWP settings.', 'give' ) ); ?></td>
678 <td><?php echo esc_html( ! empty( $enabled_gateways ) ? $enabled_gateways : '&ndash;' ); ?></td>
679 </tr>
680 <tr>
681 <td data-export-label="Default Payment Gateway"><?php _e( 'Default Payment Gateway', 'give' ); ?>:</td>
682 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The default payment gateway selected in GiveWP settings.', 'give' ) ); ?></td>
683 <td><?php echo esc_html( ! empty( $default_gateway ) ? $default_gateway : '&ndash;' ); ?></td>
684 </tr>
685 <tr>
686 <td data-export-label="PayPal IPN Verification"><?php _e( 'PayPal IPN Verification', 'give' ); ?>:</td>
687 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether admins requires verification of IPN notifications with PayPal.', 'give' ) ); ?></td>
688 <td><?php echo 'enabled' === give_get_option( 'paypal_verification' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
689 </tr>
690 <tr>
691 <td data-export-label="PayPal IPN Notifications"><?php _e( 'PayPal IPN Notifications', 'give' ); ?>:</td>
692 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether when last PayPal IPN is received with which donation or transaction.', 'give' ) ); ?></td>
693 <td>
694 <?php
695 $last_paypal_ipn_received = get_option( 'give_last_paypal_ipn_received', [] );
696 $donation_id = isset( $last_paypal_ipn_received['payment_id'] ) ? $last_paypal_ipn_received['payment_id'] : null;
697 if (
698 is_array( $last_paypal_ipn_received )
699 && count( $last_paypal_ipn_received ) > 0
700 && $donation_id !== null
701 && get_post( $donation_id ) instanceof WP_Post
702 ) {
703 $ipn_timestamp = give_get_meta( $donation_id, 'give_last_paypal_ipn_received', true );
704 $transaction_url = 'https://history.paypal.com/cgi-bin/webscr?cmd=_history-details-from-hub&id=' . $last_paypal_ipn_received['transaction_id'];
705 $donation_url = site_url() . '/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $donation_id;
706 echo sprintf(
707 __( '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' ),
708 $donation_url,
709 $donation_id,
710 $transaction_url,
711 $last_paypal_ipn_received['transaction_id'],
712 date_i18n( 'm/d/Y', $ipn_timestamp ),
713 date_i18n( 'H:i', $ipn_timestamp ),
714 $last_paypal_ipn_received['auth_status']
715 );
716 } else {
717 echo 'N/A';
718 }
719 ?>
720 </td>
721 </tr>
722 <tr>
723 <td data-export-label="Donor Email Access"><?php _e( 'Donor Email Access', 'give' ); ?>:</td>
724 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether donors can access their donation history using only email.', 'give' ) ); ?></td>
725 <td><?php echo 'enabled' === give_get_option( 'email_access' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
726 </tr>
727 <tr>
728 <td data-export-label="Stripe Webhook Notifications"><?php _e( 'Stripe Webhook Notifications', 'give' ); ?>:</td>
729 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Displays whether when last Stripe Webhook is received with which donation or transaction.', 'give' ) ); ?></td>
730 <td>
731 <?php
732 $webhook_received_on = give_get_option( 'give_stripe_last_webhook_received_timestamp' );
733 if ( ! empty( $webhook_received_on ) ) {
734 $date_time_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
735 echo date_i18n( esc_html( $date_time_format ), $webhook_received_on );
736 } else {
737 echo 'N/A';
738 }
739 ?>
740 </td>
741 </tr>
742 <?php
743 /**
744 * This action hook will be used to add system info configuration for GiveWP.
745 *
746 * @since 2.5.14
747 *
748 * @param array $give_options List of Give Settings.
749 *
750 */
751 do_action( 'give_add_system_info_configuration', $give_options );
752 ?>
753 </tbody>
754 </table>
755
756 <table class="give-status-table widefat" cellspacing="0">
757 <thead>
758 <tr>
759 <th colspan="3" data-export-label="Active GiveWP Add-ons">
760 <h2><?php _e( 'Active GiveWP Add-ons', 'give' ); ?></h2></th>
761 </tr>
762 </thead>
763 <tbody>
764 <?php
765 foreach ( $give_add_ons as $plugin_data ) {
766 // Only show Give Core Activated Add-Ons.
767 if (
768 'active' !== $plugin_data['Status']
769 || false !== strpos( $plugin_data['Name'], 'GiveWP - Donation Plugin' )
770 ) {
771 continue;
772 }
773
774 $plugin_name = $plugin_data['Name'];
775 $author_name = $plugin_data['Author'];
776
777 // Link the plugin name to the plugin URL if available.
778 if ( ! empty( $plugin_data['PluginURI'] ) ) {
779 $plugin_name = sprintf(
780 '<a href="%s" title="%s">%s</a>',
781 esc_url( $plugin_data['PluginURI'] ),
782 esc_attr__( 'Visit plugin homepage', 'give' ),
783 $plugin_name
784 );
785 }
786
787 // Link the author name to the author URL if available.
788 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
789 $author_name = sprintf(
790 '<a href="%s" title="%s">%s</a>',
791 esc_url( $plugin_data['AuthorURI'] ),
792 esc_attr__( 'Visit author homepage', 'give' ),
793 $author_name
794 );
795 }
796 ?>
797 <tr>
798 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
799 <td class="help">&nbsp;</td>
800 <td>
801 <?php
802 if ( isset( $plugin_data['License'] ) && true === $plugin_data['License'] ) {
803 echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> ' . __( 'Licensed', 'give' );
804 } else {
805 echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> ' . __( 'Unlicensed', 'give' );
806 }
807
808 echo ' &ndash; '
809 . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
810 . ' &ndash; '
811 . esc_html( $plugin_data['Version'] );
812 ?>
813 </td>
814 </tr>
815 <?php
816 }
817 ?>
818 </tbody>
819 </table>
820
821 <table class="give-status-table widefat" cellspacing="0">
822 <thead>
823 <tr>
824 <th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e( 'Other Active Plugins', 'give' ); ?></h2>
825 </th>
826 </tr>
827 </thead>
828 <tbody>
829 <?php
830 foreach ( $plugins as $plugin_data ) {
831 // Do not show Give Core and it's Add-On plugins.
832 if (
833 'active' !== $plugin_data['Status']
834 || in_array( $plugin_data['AuthorName'], $give_plugin_authors )
835 || false !== strpos( $plugin_data['PluginURI'], 'givewp.com' )
836 ) {
837 continue;
838 }
839
840 $plugin_name = $plugin_data['Name'];
841 $author_name = $plugin_data['Author'];
842
843 // Link the plugin name to the plugin URL if available.
844 if ( ! empty( $plugin_data['PluginURI'] ) ) {
845 $plugin_name = sprintf(
846 '<a href="%s" title="%s">%s</a>',
847 esc_url( $plugin_data['PluginURI'] ),
848 esc_attr__( 'Visit plugin homepage', 'give' ),
849 $plugin_name
850 );
851 }
852
853 // Link the author name to the author URL if available.
854 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
855 $author_name = sprintf(
856 '<a href="%s" title="%s">%s</a>',
857 esc_url( $plugin_data['AuthorURI'] ),
858 esc_attr__( 'Visit author homepage', 'give' ),
859 $author_name
860 );
861 }
862 ?>
863 <tr>
864 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
865 <td class="help">&nbsp;</td>
866 <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>
867 </tr>
868 <?php
869 }
870 ?>
871 </tbody>
872 </table>
873
874 <table class="give-status-table widefat" cellspacing="0">
875 <thead>
876 <tr>
877 <th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e( 'Inactive Plugins', 'give' ); ?></h2></th>
878 </tr>
879 </thead>
880 <tbody>
881 <?php
882 foreach ( $plugins as $plugin_data ) {
883 if ( 'inactive' !== $plugin_data['Status'] ) {
884 continue;
885 }
886
887 $plugin_name = $plugin_data['Name'];
888 $author_name = $plugin_data['Author'];
889
890 // Link the plugin name to the plugin URL if available.
891 if ( ! empty( $plugin_data['PluginURI'] ) ) {
892 $plugin_name = sprintf(
893 '<a href="%s" title="%s">%s</a>',
894 esc_url( $plugin_data['PluginURI'] ),
895 esc_attr__( 'Visit plugin homepage', 'give' ),
896 $plugin_name
897 );
898 }
899
900 // Link the author name to the author URL if available.
901 if ( ! empty( $plugin_data['AuthorURI'] ) ) {
902 $author_name = sprintf(
903 '<a href="%s" title="%s">%s</a>',
904 esc_url( $plugin_data['AuthorURI'] ),
905 esc_attr__( 'Visit author homepage', 'give' ),
906 $author_name
907 );
908 }
909 ?>
910 <tr>
911 <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
912 <td class="help">&nbsp;</td>
913 <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>
914 </tr>
915 <?php
916 }
917 ?>
918 </tbody>
919 </table>
920
921 <?php
922 $active_mu_plugins = (array) get_mu_plugins();
923 if ( ! empty( $active_mu_plugins ) ) {
924 ?>
925 <table class="give-status-table widefat" cellspacing="0">
926 <thead>
927 <tr>
928 <th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e( 'Active MU Plugins', 'give' ); ?></h2>
929 </th>
930 </tr>
931 </thead>
932 <tbody>
933 <?php
934
935 foreach ( $active_mu_plugins as $mu_plugin_data ) {
936 if ( ! empty( $mu_plugin_data['Name'] ) ) {
937 // Link the plugin name to the plugin URL if available.
938 $plugin_name = esc_html( $mu_plugin_data['Name'] );
939
940 if ( ! empty( $mu_plugin_data['PluginURI'] ) ) {
941 $plugin_name = sprintf(
942 '<a href="%s" title="%s">%s</a>',
943 esc_url( $mu_plugin_data['PluginURI'] ),
944 esc_attr__( 'Visit plugin homepage', 'give' ),
945 $plugin_name
946 );
947 }
948
949 // Link the author name to the author URL if available.
950 $author_name = esc_html( $mu_plugin_data['Author'] );
951
952 if ( ! empty( $mu_plugin_data['AuthorURI'] ) ) {
953 $author_name = sprintf(
954 '<a href="%s">%s</a>',
955 esc_url( $mu_plugin_data['AuthorURI'] ),
956 $author_name
957 );
958 }
959 ?>
960 <tr>
961 <td><?php echo $plugin_name; ?></td>
962 <td class="help">&nbsp;</td>
963 <td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), $author_name ) . ' &ndash; ' . esc_html( $mu_plugin_data['Version'] ); ?></td>
964 </tr>
965 <?php
966 }
967 }
968 ?>
969 </tbody>
970 </table>
971 <?php } ?>
972
973 <table class="give-status-table widefat" cellspacing="0">
974 <thead>
975 <tr>
976 <th colspan="3" data-export-label="Theme"><h2><?php _e( 'Theme', 'give' ); ?></h2></th>
977 </tr>
978 </thead>
979 <?php
980 require_once ABSPATH . 'wp-admin/includes/theme-install.php';
981 $active_theme = wp_get_theme();
982 ?>
983 <tbody>
984 <tr>
985 <td data-export-label="Name"><?php _e( 'Name', 'give' ); ?>:</td>
986 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the current active theme.', 'give' ) ); ?></td>
987 <td><?php echo esc_html( $active_theme->Name ); ?></td>
988 </tr>
989 <tr>
990 <td data-export-label="Version"><?php _e( 'Version', 'give' ); ?>:</td>
991 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the current active theme.', 'give' ) ); ?></td>
992 <td><?php echo esc_html( $active_theme->Version ); ?></td>
993 </tr>
994 <tr>
995 <td data-export-label="Author URL"><?php _e( 'Author URL', 'give' ); ?>:</td>
996 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The theme developer\'s URL.', 'give' ) ); ?></td>
997 <td><?php echo $active_theme->{'Author URI'}; ?></td>
998 </tr>
999 <tr>
1000 <td data-export-label="Child Theme"><?php _e( 'Child Theme', 'give' ); ?>:</td>
1001 <td class="help"><?php echo Give()->tooltips->render_help( __( 'Whether the current theme is a child theme.', 'give' ) ); ?></td>
1002 <td>
1003 <?php
1004 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' );
1005 ?>
1006 </td>
1007 </tr>
1008 <?php
1009 if ( is_child_theme() ) {
1010 $parent_theme = wp_get_theme( $active_theme->Template );
1011 ?>
1012 <tr>
1013 <td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'give' ); ?>:</td>
1014 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The name of the parent theme.', 'give' ) ); ?></td>
1015 <td><?php echo esc_html( $parent_theme->Name ); ?></td>
1016 </tr>
1017 <tr>
1018 <td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'give' ); ?>:</td>
1019 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The installed version of the parent theme.', 'give' ) ); ?></td>
1020 <td><?php echo esc_html( $parent_theme->Version ); ?></td>
1021 </tr>
1022 <tr>
1023 <td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'give' ); ?>:</td>
1024 <td class="help"><?php echo Give()->tooltips->render_help( __( 'The parent theme developers URL.', 'give' ) ); ?></td>
1025 <td><?php echo $parent_theme->{'Author URI'}; ?></td>
1026 </tr>
1027 <?php } ?>
1028 </tbody>
1029 </table>
1030
1031 <script type="text/javascript">
1032 jQuery('.js-give-debug-report-button').click(function () {
1033 var report = '';
1034 var first_row = true;
1035
1036 jQuery('.give-status-table thead, .give-status-table tbody').each(function () {
1037 if (jQuery(this).is('thead')) {
1038
1039 var label = jQuery(this).find('th:eq(0)').data('export-label') || jQuery(this).text();
1040
1041 if (true === first_row) {
1042 report = '### ' + jQuery.trim(label) + ' ###\n\n';
1043 first_row = false;
1044 } else {
1045 report = report + '\n### ' + jQuery.trim(label) + ' ###\n\n';
1046 }
1047 } else {
1048
1049 jQuery('tr', jQuery(this)).each(function () {
1050
1051 var label = jQuery(this).find('td:eq(0)').data('export-label') || jQuery(this).find('td:eq(0)').text();
1052 var the_name = jQuery.trim(label).replace(/(<([^>]+)>)/ig, ''); // Remove HTML.
1053
1054 // Find value
1055 var $value_html = jQuery(this).find('td:eq(2)').clone();
1056 $value_html.find('.private').remove();
1057 $value_html.find('.dashicons-yes').replaceWith('&#10004;');
1058 $value_html.find('.dashicons-no-alt, .dashicons-warning').replaceWith('&#10060;');
1059
1060 // Format value
1061 var the_value = jQuery.trim($value_html.text());
1062 // var value_array = the_value.split( ', ' );
1063 //
1064 // if ( value_array.length > 1 ) {
1065 // // If value have a list of plugins ','.
1066 // // Split to add new line.
1067 // var temp_line ='';
1068 // jQuery.each( value_array, function( key, line ) {
1069 // temp_line = temp_line + line + '\n';
1070 // });
1071 //
1072 // the_value = temp_line;
1073 // }
1074
1075 report = report + '' + the_name + ': ' + the_value + '\n';
1076 });
1077
1078 }
1079 });
1080
1081 try {
1082 jQuery('.js-give-debug-report').slideDown();
1083 jQuery('.js-give-debug-report').find('textarea').val(report).focus().select();
1084 jQuery(this).hide();
1085 return false;
1086 } catch (e) {
1087 /* jshint devel: true */
1088 console.log(e);
1089 }
1090
1091 return false;
1092 });
1093 </script>
1094