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