• Resolved kitarak

    (@kitarak)


    Hey guys,

    Looks like a great plugin! I’m wanting to clone sites, but one plugin in particular will need a variable setting, which will be given at the time site is cloned… is there a particular hook I can/should use within your plugin to have it read this variable as it populates plugin settings on the new site?

    Thanks very much for any help you can provide.

    https://ww.wp.xz.cn/plugins/ns-cloner-site-copier/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Never Settle

    (@neversettle)

    Thanks Kitarak.

    Probably the best hook to use would be the action called “ns_cloner_after_clone_tables”. An rough example to get you started:

    add_action( 'ns_cloner_after_clone_tables', 'kitarak_custom' );
    function kitarak_custom(){
        global $ns_cloner;
        update_site_option( $ns_cloner->target_id, 'option_name', 'new_option_value' );
    }

    Feel free to reopen this thread and ask if you have any further questions!

    Thread Starter kitarak

    (@kitarak)

    This worked perfectly. Thank you!

    Plugin Author Never Settle

    (@neversettle)

    You’re welcome! Glad we could help.

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

The topic ‘Variable plugin setting when cloning?’ is closed to new replies.