pluginkollektiv / antispam-bee

„... another popular solution to fight spam is Antispam Bee“ – Matt Mullenweg, Q&A WordCamp Europe 2014
https://wordpress.org/plugins/antispam-bee/
GNU General Public License v2.0
162 stars 26 forks source link

Improve Multisite compatibility #37

Open swissspidy opened 8 years ago

swissspidy commented 8 years ago

See https://wordpress.org/support/topic/multisite-default-settings-1 and pluginkollektiv/statify#23

mundschenk-at commented 6 years ago

Network activation of ASB does not apply the same settings to each site (so true network-wide settings would be a possible feature).

websupporter commented 6 years ago

If we move on with this feature, we should take into consideration that single site settings should be able to overwrite network site settings. E.g. if you use Multisite for different languages, you might want to change the allowed languages on each site.

vaclavgreif commented 6 years ago

Hello, first step might be to at least add a filter for the settings - that way it would be super simple to change the settings globally for the whole network. I guess two filters might come handy:

    private static function _init_internal_vars()
            ....
             self::$defaults = apply_filters('ab_default_options',self::$defaults);

       public static function get_options()
        ....
              return apply_filters('ab_options', wp_parse_args(
                 $options,
                 self::$defaults['options']
              ));
websupporter commented 6 years ago

Hi @vasikgreif, this would be a good approach. Currently, I do not know, if we could support such a filter after our re-factoring, this is why I hesitate to say, we should go down this path. Maybe @schlessera can chim in for this?

schlessera commented 6 years ago

Adding a filter now would create a public interface we need to support indefinitely, while we are actually planning on doing a major refactor. For people having an immediate need to manage these options, I think adding a basic WP-CLI command for now would be the safer approach. The command can always be rewritten to adapt its behavior, a filter can't, as you're directly manipulating the internal data.

JustThomas commented 6 years ago

@vasikgreif You can use the option_antispam_bee filter from WordPress core. https://developer.wordpress.org/reference/hooks/option_option/

florianbrinkmann commented 2 years ago

Idea from Twitter: having one table with spam from all sites in a multisite (https://twitter.com/xwolf/status/1443576562335424531)

s-a-s-k-i-a commented 1 month ago

Has this been followed up by dev team?