wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



is_network_only_plugin › WordPress Function

Od3.0.0
Przestarzałyn/a
is_network_only_plugin ( $plugin )
Parametry:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Wymagane: Tak
Powrót:
  • (bool) True if plugin is network only, false otherwise.
Zdefiniowane na:
Codex:

Checks for "Network: true" in the plugin header to see if this should be activated only as a network wide plugin. The plugin would also work when Multisite is not enabled.

Checks for "Site Wide Only: true" for backward compatibility.


Źródło

function is_network_only_plugin( $plugin ) {
	$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
	if ( $plugin_data ) {
		return $plugin_data['Network'];
	}
	return false;
}