WP_Recovery_Mode::is_network_plugin

Advertisement

Summery Summery

Checks whether the given extension a network activated plugin.

Syntax Syntax

WP_Recovery_Mode::is_network_plugin( array $extension )

Parameters Parameters

$extension

(array) (Required) Extension data.

Return Return

(bool) True if network plugin, false otherwise.

Source Source

File: wp-includes/class-wp-recovery-mode.php

	 */
	protected function is_network_plugin( $extension ) {
		if ( 'plugin' !== $extension['type'] ) {
			return false;
		}

		if ( ! is_multisite() ) {
			return false;
		}

		$network_plugins = wp_get_active_network_plugins();

		foreach ( $network_plugins as $plugin ) {
			if ( 0 === strpos( $plugin, $extension['slug'] . '/' ) ) {
				return true;
			}
		}

		return false;

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.