• Resolved Gregg

    (@lorax)


    I’ve written a plugin that I want to be active and available to admins of one of the websites in a multisite network. I’ve been trying to find the action/function to use so it won’t be activated on all sites.

Viewing 1 replies (of 1 total)
  • Thread Starter Gregg

    (@lorax)

    I figured it out. I was looking for a variable or way to give the menu scope by using a special function. The answer is much easier. I used this:

    if (get_current_blog_id() <= 1 ) {
    All of the plugin processing code goes here.
    }

    All of the plugin code within if statement is ignored if the condition is not met. In my case, I wanted the plugin to be live only on the first subsite and not the rest so I used the blog_id for that subsite.

Viewing 1 replies (of 1 total)

The topic ‘How to make plugin activation optional on multisite install’ is closed to new replies.