Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have the following lines of code that add the settings link and setup for my plugin:

add_action('admin_menu', array(&$this, 'admin_settings_menu')); // Add menu to options
add_action('admin_init', array(&$this, 'admin_settings_init')); // Add admin init functions

Now because of the nature of my plugin if the plugin is Network Installed then the settings should only be available to the network admin not the individual site admins.

Is there a way to check if the plugin is Network Installed so I can wrap an if statement round it?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You can use is_plugin_active_for_network( $plugin )

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.