function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') { if (!is_wp_error($errors)) { $errors = new WP_Error(); } // allow definition of default variables $filtered_results = apply_filters('signup_blog_init', array('user_name' => $user_name, 'user_email' => $user_email, 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors)); $user_name = $filtered_results['user_name']; $user_email = $filtered_results['user_email']; $blogname = $filtered_results['blogname']; $blog_title = $filtered_results['blog_title']; $errors = $filtered_results['errors']; if (empty($blogname)) { $blogname = $user_name; } ?> <form id="setupform" method="post" action="<?php ust_wpsignup_url(); ?> "> <input type="hidden" name="stage" value="validate-blog-signup" /> <input type="hidden" name="user_name" value="<?php echo esc_attr($user_name); ?> " /> <input type="hidden" name="user_email" value="<?php echo esc_attr($user_email); ?> " /> <?php do_action("signup_hidden_fields"); ?> <?php show_blog_form($blogname, $blog_title, $errors); ?> <p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Signup'); ?> " /></p> </form> <?php }
<td> <label for="ust_signup"><input type="checkbox" name="ust_signup" id="ust_signup"<?php echo $ust_signup['active'] ? ' checked="checked"' : ''; ?> /> <?php _e('Move wp-signup.php', 'ust'); ?> </label> <br /><?php _e('Current Signup URL:', 'ust'); ?> <strong><a target="_blank" href="<?php ust_wpsignup_url(); ?> "><?php ust_wpsignup_url(); ?> </a></strong> <br /><em><?php _e("Checking this option will disable the wp-signup.php form and change the signup url automatically every 24 hours. It will look something like <strong>http://{$domain}/signup-XXX/</strong>. To use this you may need to make some slight edits to your main theme's template files. Replace any hardcoded links to wp-signup.php with this function: <strong><?php ust_wpsignup_url(); ?></strong> Within post or page content you can insert the <strong>[ust_wpsignup_url]</strong> shortcode, usually in the href of a link. See the install.txt file for more detailed documentation on this function.", 'ust'); ?> </em></td> </td> </tr> <tr valign="top"> <th scope="row"><?php _e('Spam/Unspam Blog Users', 'ust'); ?> </th> <td>
function ust_wpsignup_shortcode($content) { //replace shortcodes in content $content = str_replace('[ust_wpsignup_url]', ust_wpsignup_url(false), $content); $ust_signup = get_site_option('ust_signup'); $new_slug = defined('UST_OVERRIDE_SIGNUP_SLUG') ? UST_OVERRIDE_SIGNUP_SLUG : $ust_signup['slug']; //replace unchanged wp-signup.php calls too if ($ust_signup['active']) { $content = str_replace('wp-signup.php', trailingslashit($new_slug), $content); } return $content; }