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