I am aware to this option, but for naive users
I need the option of opening a site with my page
and a function call (that is “shortcode” api) to
your plugin can do exactly what I need:
Generation of a pre defined site.
Mulli, could you be more specific about how such shortcode would work? What are the specific steps to create a new blog that your users would take?
It’s worth mentioning now that this plugin doesn’t provide UI for creating new blogs. It simply taps into the existing new blog filters to clone an existing blog. So it’s likely that even if I understand what you’re trying to do, it may be outside the scope of this plugin.
Thanks for replying so fast…
I would like to have a signup page with a form to collect data.
Once validated I shall invoke:
site_cloner(domain, user, email, title, site2clone, etc…)
which will use the code that you already have.
This function is an API to your plugin,
assuming that the plugin is activated.
After completion the user can view or edit the new site/blog.
You may see my idea as a customized extension to the
current WordPress signup page.
The function call will take parameters of any possible parameter that is needed
while the caller may use defult values if appropriate in porder to simplify
the process of creating a new site.
Notice it has all the options you mention in you “site_cloner” sample function.
The only missing option is “site2clone”, so you have two alternatives here:
1. Clone the default blog, as specified in Multisite Cloner Settings.
2. On your form where users create a new site, add an input named wpmuclone_default_blog (hidden or select) with the site to clone ID, and make sure this form is submitted using the POST method. <input name="wpmuclone_default_blog" type="hidden" value="XX">
Both of this alternatives will result in a cloned site when this plugin is active.