PluginProbe
WP Ultimate Post Grid / 2.8.2
WP Ultimate Post Grid v2.8.2
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
wp-ultimate-post-grid / vendor / vafpress / classes / security.php

security.php in WP Ultimate Post Grid 2.8.2, at vendor/vafpress/classes/security.php

43 lines 611 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class VP_Security
4 {
5
6 /**
7 * Singleton instance of the class
8 * @var VP_Security
9 */
10 private static $_instance;
11
12 private $_whitelist = array();
13
14 public static function instance()
15 {
16 if (is_null(self::$_instance))
17 self::$_instance = new self();
18
19 return self::$_instance;
20 }
21
22 public function whitelist_function($name)
23 {
24 if( ! in_array($name, $this->_whitelist) )
25 {
26 $this->_whitelist[] = $name;
27 return $name;
28 }
29 return false;
30 }
31
32 public function is_function_whitelisted($name)
33 {
34 if( in_array($name, $this->_whitelist) )
35 return true;
36 return false;
37 }
38
39 }
40
41 /**
42 * EOF
43 */