Support » Plugin: Multisite Cloner » shortcode??

  • Resolved mulli.bahr

    (@mullibahr)


    Hi
    I would like to generate clones automatically
    I wish to allow end users (students…) to generate their own site
    and get to work instantly.

    A shortcode can do the trick with super user permissions.
    Can you add one?

    Thanks
    Mulli

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Manuel Razzari

    (@manuelrazzari)

    Mulli, a shortcode will not do what you need. I’m not sure what you mean here.
    I think you should try something like enabling users to add new sites. Example.

    mulli.bahr

    (@mullibahr)

    Hi
    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.

    I hope it is clearer now

    Plugin Author Manuel Razzari

    (@manuelrazzari)

    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.

    mulli.bahr

    (@mullibahr)

    Hi Manuel
    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.

    Plugin Author Manuel Razzari

    (@manuelrazzari)

    Mulli, what you’re looking for already exists in WP core. See:
    https://codex.wordpress.org/Function_Reference/wpmu_create_blog

    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.

    Plugin Author Manuel Razzari

    (@manuelrazzari)

    Marking resolved as we haven’t heard back, and this isn’t a plugin issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘shortcode??’ is closed to new replies.