If you’re using the Member Network Sites Add On, the code recipe below demonstrates (at a high level) how you can limit allowed plugins and themes based on the membership level purchased.
The Code Recipe
Save the code recipe below as a .php file and upload it to the ‘wp-content/mu-plugins’ folder. Update the pmpro_plugins_per_level
and pmpro_themes_per_levels
globals in the plugin.
Note: Make sure that you have “Enable Administration Menus” checked in the Network Settings page of the network dashboard.
Want more pre-configuration options?
There are many ways to pre-congifure the site that is created at checkout (custom code, this recipe above, or the plugin described below). We’ve guided our PMPro Plus members through this process via the members forums.
One way is to use the pmpro_network_new_site
hook to run custom code after a new site is setup. During this action, you can change properties of the admin user, change the default theme, create stub pages, or really run any code you need to. Here is an example that uses the hook to changes new users to the editor role when their site is created.
Free Course: Membership Site Development—The Basics
Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.