Feature #4 Regular expression filters
This commit is contained in:
@ -80,7 +80,8 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
* @param object $upgrader Upgrader object (unused)
|
||||
* @param array $options Options array
|
||||
*
|
||||
* @since 1.2.0
|
||||
* @since 1.2.0
|
||||
* @changed 1.3.0
|
||||
*/
|
||||
public static function upgrade() {
|
||||
self::update_options();
|
||||
@ -95,5 +96,16 @@ class StatifyBlacklist_System extends StatifyBlacklist {
|
||||
update_option( 'statify-blacklist', $options );
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if regular expressions option exists (pre 1.3.0) */
|
||||
if ( isset( self::$_options['referer_regexp'] ) ) {
|
||||
$options = self::$_options;
|
||||
$options['referer_regexp'] = 0;
|
||||
if ( ( is_multisite() && array_key_exists( STATIFYBLACKLIST_BASE, (array) get_site_option( 'active_sitewide_plugins' ) ) ) ) {
|
||||
update_site_option( 'statify-blacklist', $options );
|
||||
} else {
|
||||
update_option( 'statify-blacklist', $options );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user