PluginProbe
Boxzilla – WordPress Popup Builder / 3.1.3
Boxzilla – WordPress Popup Builder v3.1.3
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
← All changes | src/class-loader.php +1 -22 3.1.163.1.3 View file →
@@ -71,9 +71,8 @@
71 71 $string = strtolower( $string );
72 72
73 73 foreach( $patterns as $pattern ) {
74 74
75 - $pattern = rtrim( $pattern, '/' );
76 75 $pattern = strtolower( $pattern );
77 76
78 77 if( function_exists( 'fnmatch' ) ) {
79 78 $match = fnmatch( $pattern, $string );
@@ -88,24 +87,8 @@
88 87
89 88 return false;
90 89 }
91 90
92 - /**
93 - * @return string
94 - */
95 - protected function get_request_url() {
96 - // strip trailing slashes
97 - $request_uri = rtrim( $_SERVER['REQUEST_URI'], '/' );
98 -
99 - // strip ? and query string
100 - $qpos = strpos( $request_uri, '?' );
101 - if( $qpos ) {
102 - $request_uri = substr( $request_uri, 0, $qpos );
103 - }
104 -
105 - return $request_uri;
106 - }
107 -
108 91 /**
109 92 * Check if this rule passes (conditional matches expected value)
110 93 *
111 94 * @param string $condition
@@ -126,9 +109,9 @@
126 109 $matched = true;
127 110 break;
128 111
129 112 case 'is_url':
130 - $matched = $this->match_patterns( $this->get_request_url(), $value );
113 + $matched = $this->match_patterns( $_SERVER['REQUEST_URI'], $value );
131 114 break;
132 115
133 116 case 'is_referer':
134 117 if( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
@@ -160,12 +143,8 @@
160 143
161 144 case 'is_post_with_tag':
162 145 $matched = is_singular( 'post' ) && has_tag( $value );
163 146 break;
164 -
165 - case 'is_user_logged_in':
166 - $matched = is_user_logged_in();
167 - break;
168 147 }
169 148
170 149 /**
171 150 * Filters whether a given box rule matches the condition and expected value.