Open swissspidy opened 8 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).
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.
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']
));
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?
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.
@vasikgreif You can use the option_antispam_bee
filter from WordPress core.
https://developer.wordpress.org/reference/hooks/option_option/
Idea from Twitter: having one table with spam from all sites in a multisite (https://twitter.com/xwolf/status/1443576562335424531)
Has this been followed up by dev team?
See https://wordpress.org/support/topic/multisite-default-settings-1 and pluginkollektiv/statify#23