WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

is_network fire call to database #348

@1ucay

Description

@1ucay

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions