Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Last active October 23, 2015 15:04
Show Gist options
  • Save igmoweb/dda578ecd0d833e7f0de to your computer and use it in GitHub Desktop.
Save igmoweb/dda578ecd0d833e7f0de to your computer and use it in GitHub Desktop.
NBT + Pro Sites integration
<?php
add_filter( 'psts_setting_checkout_url', 'katarzyna_nbt_pro_sites_checkout_url' );
function katarzyna_nbt_pro_sites_checkout_url( $value ) {
global $pagenow, $psts;
if ( ! is_object( $psts ) )
return $value;
$show_signup = $psts->get_setting( 'show_signup' );
if ( ! is_admin() && 'wp-signup.php' == $pagenow && $show_signup && isset( $_REQUEST['blog_template'] ) ) {
$value = add_query_arg( 'blog_template', $_REQUEST['blog_template'], $value );
}
return $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment