• Resolved Shaun Williams

    (@eangulus)


    Just wanted a better understanding on how this plugin works in Multisite.

    If I Network Activate, I presume it will apply snippets to all sites. But what if I need a snippet set to only some sites? Am I able to have some snippets network wide while having other snippets site specific?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Basically, Network Activating the plugin will not affect how snippets run – it just means that the admin interface will be present on all sites. In practice, Network Activating is no different than if you activated the plugin on every site, individually.

    If you do Network Activate the plugin, or at the very least have it active on the main site, you will find that there is an additional menu in the network admin dashboard. In this menu, you can create two sorts of snippets:

    • Snippets that are Network Activated, and run on every site of the network
    • Snippets that are shared across the network. This means they are not automatically executed, but instead can be activated on a per-site basis.

    Of course, with either of these options you can always visit a sub-site and create snippets that will only appear on that particular site.

    • This reply was modified 9 years, 2 months ago by Shea Bunge.
    Thread Starter Shaun Williams

    (@eangulus)

    Perfect, that’s sounds exactly like what I need.

    Thank you for the in-depth information.

    Plugin Author Shea Bunge

    (@bungeshea)

    No problem, I’m glad the plugin can help 🙂

    Thread Starter Shaun Williams

    (@eangulus)

    Just trying out the plugin.

    The snippets are showing as available on all subsites when I enter it in the Network Admin page.

    But when I select the snippet to be network activated, it isn’t. After activating I go to the subsite and the snippet isn’t active. I can activate from the subsite itself, but that will be annoying as my point of trying this is to avoid having to manually go to each subsite to make changes on common code.

    Im not getting errors or anything either, just network activate a snippet, seems to go thru but when checking it isn’t activated on subsites.

    Thread Starter Shaun Williams

    (@eangulus)

    I think I just saw the issue.

    If I select the snippet sharing, I can’t network activate, but if I deselect sharing then it does network activate, although I can’t see the snippet on the subsite list.

    Not sure if this is intentional or not, but from the description, I had the impression and hope that it worked like the plugins. If I network activate a snippet I should see the snippet in the subsite, I just shouldn’t be able to deactivate from the subsite.

    Plugin Author Shea Bunge

    (@bungeshea)

    I don’t believe that plugins used to work like this. It’s a good point though, for consistency perhaps network active snippets should be visible on every site as read-only. I’ll see about implementing this in a future version.

    Thread Starter Shaun Williams

    (@eangulus)

    Plugins do currently work like this.

    If I am logged in a Network admin, and am under the Network Admin area, I can see all plugins. I can network activate any plugin from there.

    If I then go to a subsite admin->plugins, I can see all plugins, I can activate a plugin for that subsite, and I can see which plugins are network activated. I can’t touch the network activated ones from the subsite, but I can see they are there and enabled.

    Plugin Author Shea Bunge

    (@bungeshea)

    Oh yes, they definitely work like this now. I am just questioning whether they did a few years ago, when I was first designing the network snippets functionality, as I originally modeled it off how plugins work. Perhaps I just missed it.

    Like I said, it sounds like this should be a feature, so I’ll add it to the top of my list of features to implement.

    Thread Starter Shaun Williams

    (@eangulus)

    Sorry misunderstood. But yeah it would be great if it can work the same as plugins do now in Multisite.

    Plugin Author Shea Bunge

    (@bungeshea)

    Does this look like what you had in mind Shaun? Currently, all you can do with a network snippet is see whether it is active or not – there are no links to activate, deactivate, edit or delete network snippets.

    screenshot

    Something to keep in mind is that the action links are hidden by default, and only show on hover. This doesn’t really work so well when trying to mimic the plugins menu. What are your thoughts on disabling this feature so that the action links display all the time?

    Plugin Author Shea Bunge

    (@bungeshea)

    Just an update: I added this feature in version 1.8.3.

    Thread Starter Shaun Williams

    (@eangulus)

    Thanks. Will check it out

    Thread Starter Shaun Williams

    (@eangulus)

    Just took a look at the snippets, and when looking at snippets via a sub site, there are duplicates there. I have 8 snippets in the Network section, and all of those are in the sub site twice each.

    Plugin Author Shea Bunge

    (@bungeshea)

    Thanks Shaun. It looks like someone else has noticed this problem and started a new thread: https://ww.wp.xz.cn/support/topic/double-items-in-multi-website-sites/

    I’ll take a look and see if I can sort this out properly.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Multisite Question’ is closed to new replies.