PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 3.2.4.1
Adminify – White Label, Admin Menu Editor, Login Customizer v3.2.4.1
4.3.3 4.3.2 4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 All 166 releases
← All changes | Inc/Modules/ServerInformation/ServerInfo_Server_Details.php +123 -74 4.2.13 → 3.2.4.1 View file →
@@ -1,27 +1,30 @@
1 1 <?php
2 2
3 -namespace PXLBSAdminify\Inc\Modules\ServerInformation;
3 +namespace WPAdminify\Inc\Modules\ServerInformation;
4 4
5 -use PXLBSAdminify\Inc\Classes\ServerInfo;
6 -use PXLBSAdminify\Inc\Utils;
5 +use WPAdminify\Inc\Classes\ServerInfo ;
6 +use WPAdminify\Inc\Utils ;
7 7 // no direct access allowed
8 8 if ( !defined( 'ABSPATH' ) ) {
9 9 exit;
10 10 }
11 11 /**
12 - * PXLBSAdminify
12 + * WPAdminify
13 13 *
14 14 * @package Server Information
15 15 *
16 16 * @author WP Adminify <[email protected]>
17 17 */
18 -class ServerInfo_Server_Details {
19 - public function __construct() {
18 +class ServerInfo_Server_Details
19 +{
20 + public function __construct()
21 + {
20 22 $this->init();
21 23 }
22 -
23 - public function init() {
24 +
25 + public function init()
26 + {
24 27 $server_info = new ServerInfo();
25 28 $help = '<span class="dashicons dashicons-editor-help"></span>';
26 29 $enabled = '<span class="adminify-compability enable"><span class="dashicons dashicons-yes"></span> ' . esc_html__( 'Enabled', 'adminify' ) . '</span>';
27 30 $disabled = '<span class="adminify-compability disable"><span class="dashicons dashicons-no"></span> ' . esc_html__( 'Disabled', 'adminify' ) . '</span>';
@@ -33,17 +36,17 @@
33 36 ?>
34 37
35 38 <div class="wrap">
36 39 <h1> <?php
37 - echo esc_html( Utils::admin_page_title( esc_html__( 'Server Info', 'adminify' ) ) );
40 + echo Utils::admin_page_title( esc_html__( 'Server Info', 'adminify' ) ) ;
38 41 ?> </h1>
39 42
40 43 <p><?php
41 - echo wp_kses_post( 'Interesting information about your web server. You can also use <a href="http://linfo.sourceforge.net/" target="_blank" rel="noopener">linfo</a> or <a href="https://phpsysinfo.github.io/phpsysinfo/" target="_blank" rel="noopener">phpsysinfo</a> to get more information about the web server' );
44 + echo wp_kses_post( 'Interesting information about your web server. You can also use <a href="http://linfo.sourceforge.net/" target="_blank" rel="noopener">linfo</a> or <a href="https://phpsysinfo.github.io/phpsysinfo/" target="_blank" rel="noopener">phpsysinfo</a> to get more information about the web server' ) ;
42 45 ?>.</p>
43 46
44 47 <p><?php
45 - echo wp_kses_post( 'In the most cases you can modify some server settings like "PHP Memory Limit" or "PHP Post Max Size" by upload and modify a <code>php.ini</code> file in the WordPress <code>/wp-admin/</code> folder. Learn more about <a href="https://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/" target="_blank" rel="noopener">here</a>' );
48 + echo wp_kses_post( 'In the most cases you can modify some server settings like "PHP Memory Limit" or "PHP Post Max Size" by upload and modify a <code>php.ini</code> file in the WordPress <code>/wp-admin/</code> folder. Learn more about <a href="https://www.wpbeginner.com/wp-tutorials/how-to-increase-the-maximum-file-upload-size-in-wordpress/" target="_blank" rel="noopener">here</a>' ) ;
46 49 ?>.</p>
47 50
48 51
49 52 <table class="wp-list-table widefat posts mt-6">
@@ -49,12 +52,12 @@
49 52 <table class="wp-list-table widefat posts mt-6">
50 53 <thead>
51 54 <tr>
52 55 <th style="width: 300px" class="manage-column"><?php
53 - echo esc_html__( 'Info', 'adminify' );
56 + echo esc_html__( 'Info', 'adminify' ) ;
54 57 ?></th>
55 58 <th class="manage-column"><?php
56 - echo esc_html__( 'Result', 'adminify' );
59 + echo esc_html__( 'Result', 'adminify' ) ;
57 60 ?></th>
58 61 </tr>
59 62 </thead>
60 63 <tbody>
@@ -62,11 +65,11 @@
62 65 <td><?php
63 66 esc_html_e( 'OS', 'adminify' );
64 67 ?>:</td>
65 68 <td><?php
66 - echo wp_kses_post( PHP_OS );
69 + echo wp_kses_post( PHP_OS ) ;
67 70 ?> / <?php
68 - echo wp_kses_post( PHP_INT_SIZE * 8 ) . esc_html__( 'Bit OS', 'adminify' ) . ' (' . wp_kses_post( php_uname() ) . ')';
71 + echo wp_kses_post( PHP_INT_SIZE * 8 ) . esc_html__( 'Bit OS', 'adminify' ) . ' (' . wp_kses_post( php_uname() ) . ')' ;
69 72 ?></td>
70 73 </tr>
71 74 <tr>
72 75 <td><?php
@@ -72,9 +75,9 @@
72 75 <td><?php
73 76 esc_html_e( 'Software', 'adminify' );
74 77 ?>:</td>
75 78 <td><?php
76 - echo esc_html( ( isset( $_SERVER['SERVER_SOFTWARE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) : '' ) );
79 + echo Utils::wp_kses_custom( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ) ) ;
77 80 ?></td>
78 81 </tr>
79 82 <tr>
80 83 <td><?php
@@ -80,9 +83,9 @@
80 83 <td><?php
81 84 esc_html_e( 'IP Address', 'adminify' );
82 85 ?>:</td>
83 86 <td><?php
84 - echo esc_html( ( isset( $_SERVER['SERVER_ADDR'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_ADDR'] ) ) : '' ) );
87 + echo Utils::wp_kses_custom( wp_unslash( $_SERVER['SERVER_ADDR'] ) ) ;
85 88 ?></td>
86 89 </tr>
87 90 <tr>
88 91 <td><?php
@@ -88,9 +91,9 @@
88 91 <td><?php
89 92 esc_html_e( 'Web Port', 'adminify' );
90 93 ?>:</td>
91 94 <td><?php
92 - echo esc_html( ( isset( $_SERVER['SERVER_PORT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_PORT'] ) ) : '' ) );
95 + echo Utils::wp_kses_custom( wp_unslash( $_SERVER['SERVER_PORT'] ) ) ;
93 96 ?></td>
94 97 </tr>
95 98 <tr>
96 99 <td><?php
@@ -96,9 +99,9 @@
96 99 <td><?php
97 100 esc_html_e( 'Date / Time (WP)', 'adminify' );
98 101 ?>:</td>
99 102 <td><?php
100 - echo wp_kses_post( gmdate( 'Y-m-d H:i:s', time() ) ) . ' (' . wp_kses_post( current_time( 'mysql' ) ) . ')';
103 + echo wp_kses_post( date( 'Y-m-d H:i:s', time() ) ) . ' (' . wp_kses_post( current_time( 'mysql' ) ) . ')' ;
101 104 ?></td>
102 105 </tr>
103 106 <tr>
104 107 <td><?php
@@ -104,9 +107,9 @@
104 107 <td><?php
105 108 esc_html_e( 'Timezone (WP)', 'adminify' );
106 109 ?>:</td>
107 110 <td><?php
108 - echo wp_kses_post( date_default_timezone_get() ) . ' (' . wp_kses_post( $server_info->get_wp_timezone() ) . ')';
111 + echo wp_kses_post( date_default_timezone_get() ) . ' (' . wp_kses_post( $server_info->get_wp_timezone() ) . ')' ;
109 112 ?></td>
110 113 </tr>
111 114 <tr>
112 115 <td><?php
@@ -114,13 +117,15 @@
114 117 ?>:</td>
115 118 <td>
116 119 <?php
117 120 $default_timezone = date_default_timezone_get();
121 +
118 122 if ( 'UTC' !== $default_timezone ) {
119 - echo '<span>' . wp_kses_post( Utils::kses_custom( $no ) ) . sprintf( wp_kses_post( 'Default timezone is %s - it should be UTC', 'adminify' ), esc_html( $default_timezone ) ) . '</span>';
123 + echo '<span>' . Utils::wp_kses_custom( $no ) . sprintf( wp_kses_post( 'Default timezone is %s - it should be UTC', 'adminify' ), esc_html( $default_timezone ) ) . '</span>' ;
120 124 } else {
121 - echo wp_kses_post( Utils::kses_custom( $yes ) );
125 + echo Utils::wp_kses_custom( $yes ) ;
122 126 }
127 +
123 128 ?>
124 129 </td>
125 130 </tr>
126 131 <tr>
@@ -127,9 +132,9 @@
127 132 <td><?php
128 133 esc_html_e( 'Protocol', 'adminify' );
129 134 ?>:</td>
130 135 <td><?php
131 - echo wp_kses_post( php_uname( 'n' ) );
136 + echo wp_kses_post( php_uname( 'n' ) ) ;
132 137 ?></td>
133 138 </tr>
134 139 <tr>
135 140 <td><?php
@@ -135,9 +140,9 @@
135 140 <td><?php
136 141 esc_html_e( 'CGI Version', 'adminify' );
137 142 ?>:</td>
138 143 <td><?php
139 - echo esc_html( ( isset( $_SERVER['GATEWAY_INTERFACE'] ) ? sanitize_text_field( wp_unslash( $_SERVER['GATEWAY_INTERFACE'] ) ) : '' ) );
144 + echo esc_html( sanitize_text_field( wp_unslash( $_SERVER['GATEWAY_INTERFACE'] ) ) ) ;
140 145 ?></td>
141 146 </tr>
142 147
143 148 <?php
@@ -150,12 +155,12 @@
150 155 <td>
151 156 <div class="adminify-system-progress">
152 157 <div class="status-progressbar">
153 158 <span><?php
154 - echo wp_kses_post( Utils::kses_custom( $server_info->get_server_cpu_load_percentage() ) ) . '% ';
159 + echo Utils::wp_kses_custom( $server_info->get_server_cpu_load_percentage() ) . '% ' ;
155 160 ?></span>
156 161 <div style="width: <?php
157 - echo esc_attr( Utils::kses_custom( $server_info->get_server_cpu_load_percentage() ) );
162 + echo Utils::wp_kses_custom( $server_info->get_server_cpu_load_percentage() ) ;
158 163 ?>%"></div>
159 164 </div>
160 165 </div>
161 166 </td>
@@ -164,9 +169,9 @@
164 169 <td><?php
165 170 esc_html_e( 'CPU Load Average', 'adminify' );
166 171 ?>:</td>
167 172 <td><?php
168 - echo wp_kses_post( Utils::kses_custom( $server_info->get_cpu_load_average() ) );
173 + echo Utils::wp_kses_custom( $server_info->get_cpu_load_average() ) ;
169 174 ?></td>
170 175 </tr>
171 176 <tr>
172 177 <td><?php
@@ -174,13 +179,15 @@
174 179 ?>:</td>
175 180 <td>
176 181 <?php
177 182 $disk_space = $server_info->get_server_disk_size();
183 +
178 184 if ( $disk_space != 'N/A' ) {
179 - echo esc_html__( 'Total', 'adminify' ) . ': ' . esc_html( $disk_space['size'] ) . ' GB / ' . esc_html__( 'Free', 'adminify' ) . ': ' . esc_html( $disk_space['free'] ) . ' GB / ' . esc_html__( 'Used', 'adminify' ) . ': ' . esc_html( $disk_space['used'] ) . ' GB';
185 + echo esc_html__( 'Total', 'adminify' ) . ': ' . esc_html( $disk_space['size'] ) . ' GB / ' . esc_html__( 'Free', 'adminify' ) . ': ' . esc_html( $disk_space['free'] ) . ' GB / ' . esc_html__( 'Used', 'adminify' ) . ': ' . esc_html( $disk_space['used'] ) . ' GB' ;
180 186 } else {
181 - echo esc_html( $disk_space );
187 + echo esc_html( $disk_space ) ;
182 188 }
189 +
183 190 ?>
184 191 </td>
185 192 </tr>
186 193 <tr>
@@ -189,23 +196,25 @@
189 196 ?>:</td>
190 197 <td>
191 198 <?php
192 199 $disk_space = $server_info->get_server_disk_size();
200 +
193 201 if ( $disk_space != 'N/A' ) {
194 202 ?>
195 203 <div class="status-progressbar">
196 204 <span><?php
197 - echo esc_html( $disk_space['usage'] . '% ' );
205 + echo esc_html( $disk_space['usage'] . '% ' ) ;
198 206 ?></span>
199 207 <div style="width: <?php
200 - echo esc_attr( $disk_space['usage'] );
208 + echo esc_attr( $disk_space['usage'] ) ;
201 209 ?>%"></div>
202 210 </div>
203 211 <?php
204 - echo esc_html( ' ' . $disk_space['used'] . ' GB of ' . $disk_space['size'] . ' GB' );
212 + echo esc_html( ' ' . $disk_space['used'] . ' GB of ' . $disk_space['size'] . ' GB' ) ;
205 213 } else {
206 - echo esc_html( $disk_space );
214 + echo esc_html( $disk_space ) ;
207 215 }
216 +
208 217 ?>
209 218 </td>
210 219 </tr>
211 220 <tr>
@@ -214,13 +223,15 @@
214 223 ?>:</td>
215 224 <td>
216 225 <?php
217 226 $server_ram = $server_info->get_server_ram_details();
227 +
218 228 if ( $server_ram != 'N/A' ) {
219 - echo esc_html( $server_ram['MemTotal'] ) . ' GB';
229 + echo esc_html( $server_ram['MemTotal'] ) . ' GB' ;
220 230 } else {
221 - echo esc_html( $server_ram );
231 + echo esc_html( $server_ram ) ;
222 232 }
233 +
223 234 ?>
224 235 </td>
225 236 </tr>
226 237 <tr>
@@ -229,13 +240,15 @@
229 240 ?>:</td>
230 241 <td>
231 242 <?php
232 243 $server_ram = $server_info->get_server_ram_details();
244 +
233 245 if ( $server_ram != 'N/A' ) {
234 - echo esc_html( $server_ram['MemFree'] ) . ' GB';
246 + echo esc_html( $server_ram['MemFree'] ) . ' GB' ;
235 247 } else {
236 - echo esc_html( $server_ram );
248 + echo esc_html( $server_ram ) ;
237 249 }
250 +
238 251 ?>
239 252 </td>
240 253 </tr>
241 254 <tr>
@@ -244,26 +257,28 @@
244 257 ?>:</td>
245 258 <td>
246 259 <?php
247 260 $server_ram = $server_info->get_server_ram_details();
261 +
248 262 if ( $server_ram != 'N/A' ) {
249 263 ?>
250 264 <div class="status-progressbar">
251 265 <span>
252 266 <?php
253 - echo esc_html( $server_ram['MemUsagePercentage'] . '% ' );
267 + echo esc_html( $server_ram['MemUsagePercentage'] . '% ' ) ;
254 268 ?>
255 269 </span>
256 270 <div style="width: <?php
257 - echo esc_attr( $server_ram['MemUsagePercentage'] );
271 + echo esc_attr( $server_ram['MemUsagePercentage'] ) ;
258 272 ?>%">
259 273 </div>
260 274 </div>
261 275 <?php
262 - echo esc_html( ' ' . ($server_ram['MemTotal'] - $server_ram['MemFree']) . ' GB of ' . $server_ram['MemTotal'] . ' GB' );
276 + echo esc_html( ' ' . ($server_ram['MemTotal'] - $server_ram['MemFree']) . ' GB of ' . $server_ram['MemTotal'] . ' GB' ) ;
263 277 } else {
264 - echo esc_html( $server_ram );
278 + echo esc_html( $server_ram ) ;
265 279 }
280 +
266 281 ?>
267 282 </td>
268 283 </tr>
269 284 <tr>
@@ -271,13 +286,15 @@
271 286 esc_html_e( 'Memcached', 'adminify' );
272 287 ?>:</td>
273 288 <td>
274 289 <?php
290 +
275 291 if ( extension_loaded( 'memcache' ) ) {
276 - echo wp_kses_post( Utils::kses_custom( $yes ) );
292 + echo Utils::wp_kses_custom( $yes ) ;
277 293 } else {
278 - echo wp_kses_post( Utils::kses_custom( $no ) );
294 + echo Utils::wp_kses_custom( $no ) ;
279 295 }
296 +
280 297 ?>
281 298 </td>
282 299 </tr>
283 300
@@ -288,13 +305,14 @@
288 305 <td><?php
289 306 esc_html_e( 'PHP Version', 'adminify' );
290 307 ?>:</td>
291 308 <td><?php
292 - echo wp_kses_post( Utils::kses_custom( $server_info->get_php_version() ) );
309 + echo Utils::wp_kses_custom( $server_info->get_php_version() ) ;
293 310 ?></td>
294 311 </tr>
295 312
296 313 <?php
314 +
297 315 if ( function_exists( 'ini_get' ) ) {
298 316 ?>
299 317 <tr>
300 318 <td><?php
@@ -300,9 +318,9 @@
300 318 <td><?php
301 319 esc_html_e( 'PHP Memory Limit (WP)', 'adminify' );
302 320 ?>:</td>
303 321 <td><?php
304 - echo wp_kses_post( Utils::kses_custom( $server_info->get_wp_memory_limit() ) );
322 + echo Utils::wp_kses_custom( $server_info->get_wp_memory_limit() ) ;
305 323 ?></td>
306 324 </tr>
307 325 <tr>
308 326 <td><?php
@@ -309,26 +327,27 @@
309 327 esc_html_e( 'PHP Memory Usage', 'adminify' );
310 328 ?>:</td>
311 329 <td>
312 330 <?php
331 +
313 332 if ( $server_info->get_server_memory_usage()['MemLimitGet'] == '-1' ) {
314 333 ?>
315 334 <?php
316 - echo wp_kses_post( Utils::kses_custom( $server_info->get_server_memory_usage()['MemUsageFormat'] ) ) . ' ' . esc_html__( 'of', 'adminify' ) . ' ' . esc_html__( 'Unlimited', 'adminify' ) . ' (-1)';
335 + echo Utils::wp_kses_custom( $server_info->get_server_memory_usage()['MemUsageFormat'] ) . ' ' . esc_html__( 'of', 'adminify' ) . ' ' . esc_html__( 'Unlimited', 'adminify' ) . ' (-1)' ;
317 336 ?>
318 337 <?php
319 338 } else {
320 339 ?>
321 340 <?php
322 - echo wp_kses_post( Utils::kses_custom( $server_info->get_server_memory_usage()['MemUsageFormat'] ) ) . ' ' . esc_html__( 'of', 'adminify' ) . ' ' . wp_kses_post( Utils::kses_custom( $server_info->get_server_memory_usage()['MemLimitFormat'] ) );
341 + echo Utils::wp_kses_custom( $server_info->get_server_memory_usage()['MemUsageFormat'] ) . ' ' . esc_html__( 'of', 'adminify' ) . ' ' . Utils::wp_kses_custom( $server_info->get_server_memory_usage()['MemLimitFormat'] ) ;
323 342 ?>
324 343
325 344 <div class="adminify-system-progress">
326 345 <div class="status-progressbar"><span><?php
327 - echo wp_kses_post( Utils::kses_custom( $server_info->get_server_memory_usage()['MemUsageCalc'] ) ) . '% ';
346 + echo Utils::wp_kses_custom( $server_info->get_server_memory_usage()['MemUsageCalc'] ) . '% ' ;
328 347 ?></span>
329 348 <div style="width: <?php
330 - echo esc_attr( $server_info->get_server_memory_usage()['MemUsageCalc'] );
349 + echo esc_attr( $server_info->get_server_memory_usage()['MemUsageCalc'] ) ;
331 350 ?>%"></div>
332 351 </div>
333 352 </div>
334 353
@@ -333,8 +352,9 @@
333 352 </div>
334 353
335 354 <?php
336 355 }
356 +
337 357 ?>
338 358 </td>
339 359 </tr>
340 360 <tr>
@@ -341,9 +361,9 @@
341 361 <td><?php
342 362 esc_html_e( 'PHP Max Upload Size (WP)', 'adminify' );
343 363 ?>:</td>
344 364 <td><?php
345 - echo (int) wp_kses_post( ini_get( 'upload_max_filesize' ) ) . ' MB (' . wp_kses_post( size_format( wp_max_upload_size() ) ) . ')';
365 + echo (int) wp_kses_post( ini_get( 'upload_max_filesize' ) ) . ' MB (' . wp_kses_post( size_format( wp_max_upload_size() ) ) . ')' ;
346 366 ?></td>
347 367 </tr>
348 368 <tr>
349 369 <td><?php
@@ -349,9 +369,9 @@
349 369 <td><?php
350 370 esc_html_e( 'PHP Post Max Size', 'adminify' );
351 371 ?>:</td>
352 372 <td><?php
353 - echo wp_kses_post( size_format( $server_info->convert_memory_size( ini_get( 'post_max_size' ) ) ) );
373 + echo wp_kses_post( size_format( $server_info->convert_memory_size( ini_get( 'post_max_size' ) ) ) ) ;
354 374 ?></td>
355 375 </tr>
356 376 <tr>
357 377 <td><?php
@@ -357,9 +377,9 @@
357 377 <td><?php
358 378 esc_html_e( 'PHP Max Input Vars', 'adminify' );
359 379 ?>:</td>
360 380 <td><?php
361 - echo wp_kses_post( ini_get( 'max_input_vars' ) );
381 + echo wp_kses_post( ini_get( 'max_input_vars' ) ) ;
362 382 ?></td>
363 383 </tr>
364 384 <tr>
365 385 <td><?php
@@ -365,9 +385,9 @@
365 385 <td><?php
366 386 esc_html_e( 'PHP Max Execution Time', 'adminify' );
367 387 ?>:</td>
368 388 <td><?php
369 - echo wp_kses_post( ini_get( 'max_execution_time' ) ) . ' ' . esc_html__( 'Seconds', 'adminify' );
389 + echo wp_kses_post( ini_get( 'max_execution_time' ) ) . ' ' . esc_html__( 'Seconds', 'adminify' ) ;
370 390 ?></td>
371 391 </tr>
372 392 <tr>
373 393 <td><?php
@@ -373,9 +393,9 @@
373 393 <td><?php
374 394 esc_html_e( 'PHP Extensions', 'adminify' );
375 395 ?>:</td>
376 396 <td><?php
377 - echo esc_html( implode( ', ', get_loaded_extensions() ) );
397 + echo Utils::wp_kses_custom( implode( ', ', get_loaded_extensions() ) ) ;
378 398 ?></td>
379 399 </tr>
380 400 <tr>
381 401 <td><?php
@@ -383,13 +403,15 @@
383 403 ?>:</td>
384 404 <td>
385 405 <?php
386 406 $gdl = gd_info();
407 +
387 408 if ( $gdl ) {
388 - echo wp_kses_post( Utils::kses_custom( $yes ) ) . ' / ' . esc_html__( 'Version', 'adminify' ) . ': ' . wp_kses_post( $gdl['GD Version'] );
409 + echo Utils::wp_kses_custom( $yes ) . ' / ' . esc_html__( 'Version', 'adminify' ) . ': ' . wp_kses_post( $gdl['GD Version'] ) ;
389 410 } else {
390 - echo wp_kses_post( Utils::kses_custom( $no ) );
411 + echo Utils::wp_kses_custom( $no ) ;
391 412 }
413 +
392 414 ?>
393 415 </td>
394 416 </tr>
395 417 <tr>
@@ -396,9 +418,9 @@
396 418 <td><?php
397 419 esc_html_e( 'cURL Version', 'adminify' );
398 420 ?>:</td>
399 421 <td><?php
400 - echo wp_kses_post( Utils::kses_custom( $server_info->get_cURL_version() ) );
422 + echo Utils::wp_kses_custom( $server_info->get_cURL_version() ) ;
401 423 ?></td>
402 424 </tr>
403 425 <tr>
404 426 <td><?php
@@ -404,16 +426,18 @@
404 426 <td><?php
405 427 esc_html_e( 'SUHOSIN Installed', 'adminify' );
406 428 ?>:</td>
407 429 <td><?php
408 - echo ( wp_kses_post( extension_loaded( 'suhosin' ) ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;' );
430 + echo ( wp_kses_post( extension_loaded( 'suhosin' ) ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;' ) ;
409 431 ?></td>
410 432 </tr>
411 433 <?php
412 434 }
435 +
413 436 ?>
414 437
415 438 <?php
439 +
416 440 if ( function_exists( 'ini_get' ) ) {
417 441 ?>
418 442 <tr>
419 443 <td><?php
@@ -419,13 +443,14 @@
419 443 <td><?php
420 444 esc_html_e( 'PHP Error Log File Location', 'adminify' );
421 445 ?>:</td>
422 446 <td><?php
423 - echo wp_kses_post( ini_get( 'error_log' ) );
447 + echo wp_kses_post( ini_get( 'error_log' ) ) ;
424 448 ?></td>
425 449 </tr>
426 450 <?php
427 451 }
452 +
428 453 ?>
429 454
430 455 <?php
431 456 $fields = [];
@@ -430,67 +455,91 @@
430 455 <?php
431 456 $fields = [];
432 457 // fsockopen/cURL.
433 458 $fields['fsockopen_curl']['name'] = 'fsockopen/cURL';
459 +
434 460 if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
435 461 $fields['fsockopen_curl']['success'] = true;
436 462 } else {
437 463 $fields['fsockopen_curl']['success'] = false;
438 464 }
465 +
439 466 // SOAP.
440 467 $fields['soap_client']['name'] = 'SoapClient';
468 +
441 469 if ( class_exists( 'SoapClient' ) ) {
442 470 $fields['soap_client']['success'] = true;
443 471 } else {
444 472 $fields['soap_client']['success'] = false;
445 - /* translators: %s: SoapClient class link */
446 - $fields['soap_client']['note'] = sprintf( __( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'adminify' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' );
473 + $fields['soap_client']['note'] = sprintf( __( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'bsi' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' );
447 474 }
475 +
448 476 // DOMDocument.
449 477 $fields['dom_document']['name'] = 'DOMDocument';
478 +
450 479 if ( class_exists( 'DOMDocument' ) ) {
451 480 $fields['dom_document']['success'] = true;
452 481 } else {
453 482 $fields['dom_document']['success'] = false;
454 - /* translators: %s: DOMDocument class link */
455 - $fields['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.', 'adminify' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' );
483 + $fields['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.', 'bsi' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' );
456 484 }
485 +
457 486 // GZIP.
458 487 $fields['gzip']['name'] = 'GZip';
488 +
459 489 if ( is_callable( 'gzopen' ) ) {
460 490 $fields['gzip']['success'] = true;
461 491 } else {
462 492 $fields['gzip']['success'] = false;
463 - /* translators: %s: gzopen function link */
464 - $fields['gzip']['note'] = sprintf( __( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'adminify' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' );
493 + $fields['gzip']['note'] = sprintf( __( 'Your server does not support the %s function - this is required to use the GeoIP database from MaxMind.', 'bsi' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' );
465 494 }
495 +
466 496 // Multibyte String.
467 497 $fields['mbstring']['name'] = 'Multibyte String';
498 +
468 499 if ( extension_loaded( 'mbstring' ) ) {
469 500 $fields['mbstring']['success'] = true;
470 501 } else {
471 502 $fields['mbstring']['success'] = false;
472 - /* translators: %s: mbstring functions link */
473 - $fields['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.', 'adminify' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' );
503 + $fields['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.', 'bsi' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' );
474 504 }
505 +
506 + // Remote Get.
507 + $fields['remote_get']['name'] = 'Remote Get Status';
508 + $response = wp_remote_get( 'https://www.paypal.com/cgi-bin/webscr', [
509 + 'timeout' => 60,
510 + 'user-agent' => 'BSI/' . 1.0,
511 + 'httpversion' => '1.1',
512 + 'body' => [
513 + 'cmd' => '_notify-validate',
514 + ],
515 + ] );
516 + $response_code = wp_remote_retrieve_response_code( $response );
517 +
518 + if ( $response_code == 200 ) {
519 + $fields['remote_get']['success'] = true;
520 + } else {
521 + $fields['remote_get']['success'] = false;
522 + }
523 +
475 524 foreach ( $fields as $field ) {
476 - $mark = ( !empty( $field['success'] ) ? 'yes' : 'error' );
525 + $mark = ( !empty($field['success']) ? 'yes' : 'error' );
477 526 ?>
478 527 <tr>
479 528 <td data-export-label="<?php
480 - echo esc_attr( $field['name'] );
529 + echo esc_attr( $field['name'] ) ;
481 530 ?>"><?php
482 - echo esc_html( $field['name'] );
531 + echo esc_html( $field['name'] ) ;
483 532 ?>:</td>
484 533 <td>
485 534 <span class="<?php
486 - echo esc_attr( $mark );
535 + echo esc_attr( $mark ) ;
487 536 ?>">
488 537 <?php
489 - echo ( !empty( $field['success'] ) ? wp_kses_post( Utils::kses_custom( $yes ) ) : wp_kses_post( Utils::kses_custom( $no ) ) );
538 + echo ( !empty($field['success']) ? Utils::wp_kses_custom( $yes ) : Utils::wp_kses_custom( $no ) ) ;
490 539 ?>
491 540 <?php
492 - echo ( !empty( $field['note'] ) ? wp_kses_post( Utils::kses_custom( $field['note'] ) ) : '' );
541 + echo ( !empty($field['note']) ? Utils::wp_kses_custom( $field['note'] ) : '' ) ;
493 542 ?>
494 543 </span>
495 544 </td>
496 545 </tr>
@@ -504,5 +553,5 @@
504 553
505 554 <?php
506 555 }
507 556
508 -}
557 +}