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