PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 3.4.2
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v3.4.2
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / includes / class-updraft-log-levels.php

class-updraft-log-levels.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 3.4.2, at includes/class-updraft-log-levels.php

45 lines 911 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) die('No direct access allowed');
4
5 if (class_exists('Updraft_Log_Levels')) return;
6
7 /**
8 * Class Updraft_Log_Levels
9 */
10 class Updraft_Log_Levels {
11
12 const EMERGENCY = 'emergency';
13 const ALERT = 'alert';
14 const CRITICAL = 'critical';
15 const ERROR = 'error';
16 const WARNING = 'warning';
17 const NOTICE = 'notice';
18 const INFO = 'info';
19 const DEBUG = 'debug';
20
21 /**
22 * Return level text catption
23 *
24 * @param string $level Text of level Type.
25 * @return string Returns the Level type.
26 */
27 static public function to_text($level) {
28
29 $text = array(
30 self::EMERGENCY => 'EMERGENCY',
31 self::ALERT => 'ALERT',
32 self::CRITICAL => 'CRITICAL',
33 self::ERROR => 'ERROR',
34 self::WARNING => 'WARNING',
35 self::NOTICE => 'NOTICE',
36 self::INFO => 'INFO',
37 self::DEBUG => 'DEBUG',
38 );
39
40 if (array_key_exists($level, $text)) return $text[$level];
41
42 return '';
43 }
44 }
45