PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.7.1
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.7.1
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
flywp / includes / Helper.php

Helper.php in FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel 1.7.1, at includes/Helper.php

46 lines 950 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FlyWP;
4
5 class Helper {
6
7 /**
8 * Print_r with pre tags.
9 *
10 * @param mixed $var
11 */
12 public static function print_r( $var = null ) {
13 echo '<pre>';
14 print_r( $var );
15 echo '</pre>';
16 }
17
18 /**
19 * Var_dump and die.
20 *
21 * @param mixed $var
22 */
23 public static function dd( $var = null ) {
24 self::print_r( $var );
25 die();
26 }
27
28 /**
29 * Check if server is running Nginx.
30 *
31 * @return bool
32 */
33 public static function is_nginx() {
34 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'nginx' );
35 }
36
37 /**
38 * Check if server is running LiteSpeed.
39 *
40 * @return bool
41 */
42 public static function is_litespeed() {
43 return isset( $_SERVER['SERVER_SOFTWARE'] ) && false !== strpos( wp_unslash( $_SERVER['SERVER_SOFTWARE'] ), 'LiteSpeed' );
44 }
45 }
46