Enhancement #1 Switched from in_array() to faster isset() for referer checking

This commit is contained in:
2016-08-21 19:21:22 +02:00
parent 1e0659e649
commit 19644dd62b
6 changed files with 62 additions and 23 deletions

View File

@ -100,6 +100,7 @@ class StatifyBlacklist {
* @return TRUE if referer matches blacklist.
*
* @since 1.0.0
* @changed 1.2.0
*/
public static function apply_blacklist_filter() {
/* Skip if blacklist is inactive */
@ -121,6 +122,6 @@ class StatifyBlacklist {
/* Check blacklist */
return in_array( $referer, $blacklist );
return isset( $blacklist[ $referer ] );
}
}