simple-local-avatars
simple-local-avatars copied to clipboard
is_network fire call to database
Is your enhancement related to a problem? Please describe.
Hi, install Query Monitor and activate plugin. Look at database -> you will see SELECT option_value FROM ap_options WHERE option_name = 'active_sitewide_plugins' LIMIT 1
problem is in_network
Please change it to =>
public static function is_network( $plugin ) {
if ( ! is_multisite() )
return false;
$plugins = get_site_option( 'active_sitewide_plugins', array() );
if ( isset( $plugins[ $plugin ] ) ) {
return true;
}
return false;
}
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Also, look at register_uninstall_hook, it call get_option again
please do it like this
function simple_local_avatars_activate(){
register_uninstall_hook( __FILE__, 'simple_local_avatars_uninstall' );
}
register_activation_hook( __FILE__, 'simple_local_avatars_activate' );