Is it possible to hide the active themes in a network so that the subdomain users won’t see them as being available?
The problem is that i have 10 themes installed on the network and the subdomain users see the ones not assigned to them under Appearance -> Themes, and activate other themes. I am trying to remove this capability for the subdomain administrators.
Thanks.
You could remove the
'switch_themes'
capability from the'administrator'
role, which should prevent regular admins (as opposed to the network superadmin) from being able to switch their theme. Try this:EDIT:
From a bit more extended testing with this above function, I noticed some issues when I removed a cap and then did not explicitly add it back again when I was done testing (it seemed to actually remove it from the database rather than just for the current page). This is alright, but just be careful! If you are less comfortable with that, try the following, which intercepts capabilities for all roles, not just admins (note that network admins are excluded from this, since they have all capabilities):
If you don’t mind an jQuery solution: