Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




is_network_only_plugin [ WordPress Function ]

is_network_only_plugin ( $plugin )
Parameters:
  • (string) $plugin Plugin to check
Returns:
  • (bool) True if plugin is network only, false otherwise.
Defined at:



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 backwards compatibility.

Source


<?php
function is_network_only_plugin$plugin ) {
    
$plugin_data get_plugin_dataWP_PLUGIN_DIR '/' $plugin );
    if ( 
$plugin_data )
        return 
$plugin_data['Network'];
    return 
false;
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics