PluginProbe
Stream – Activity Log & Audit Trail / 3.6.1
Stream – Activity Log & Audit Trail v3.6.1
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
← All changes | classes/class-log.php +4 -6 3.10.03.6.1 View file →
@@ -241,12 +241,10 @@
241 241 *
242 242 * @return boolean
243 243 */
244 244 public function record_matches_rules( $record, $exclude_rules ) {
245 - $matches_needed = count( $exclude_rules );
246 - $matches_found = 0;
247 245 foreach ( $exclude_rules as $exclude_key => $exclude_value ) {
248 - if ( ! isset( $record[ $exclude_key ] ) || is_null( $exclude_value ) ) {
246 + if ( ! isset( $record[ $exclude_key ] ) ) {
249 247 continue;
250 248 }
251 249
252 250 if ( 'ip_address' === $exclude_key ) {
@@ -252,16 +250,16 @@
252 250 if ( 'ip_address' === $exclude_key ) {
253 251 $ip_addresses = explode( ',', $exclude_value );
254 252
255 253 if ( in_array( $record['ip_address'], $ip_addresses, true ) ) {
256 - $matches_found++;
254 + return true;
257 255 }
258 256 } elseif ( $record[ $exclude_key ] === $exclude_value ) {
259 - $matches_found++;
257 + return true;
260 258 }
261 259 }
262 260
263 - return $matches_found === $matches_needed;
261 + return false;
264 262 }
265 263
266 264 /**
267 265 * Get all exclude rules by row because we store them by rule instead.