Context for the signup_hidden_fields hooks.

props jeremyfelt, Cimmo.
fixes #19451.

Built from https://develop.svn.wordpress.org/trunk@25600


git-svn-id: http://core.svn.wordpress.org/trunk@25517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-09-24 15:51:10 +00:00
parent 7669224311
commit 26193b684b
1 changed files with 19 additions and 3 deletions

View File

@ -239,7 +239,17 @@ function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
<p><?php _e( 'If you&#8217;re not going to use a great site domain, leave it for a new user. Now have at it!' ) ?></p>
<form id="setupform" method="post" action="wp-signup.php">
<input type="hidden" name="stage" value="gimmeanotherblog" />
<?php do_action( 'signup_hidden_fields' ); ?>
<?php
/**
* Hidden signup form fields output for creating another site.
*
* @since MU
*
* @param string $context A string describing the step of the signup process. the value can be
* 'create-another-site', 'validate-user', or 'validate-site'.
*/
do_action( 'signup_hidden_fields', 'create-another-site' );
?>
<?php show_blog_form($blogname, $blog_title, $errors); ?>
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e( 'Create Site' ) ?>" /></p>
</form>
@ -330,7 +340,10 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
<h2><?php printf( __( 'Get your own %s account in seconds' ), $current_site->site_name ) ?></h2>
<form id="setupform" method="post" action="wp-signup.php">
<input type="hidden" name="stage" value="validate-user-signup" />
<?php do_action( 'signup_hidden_fields' ); ?>
<?php
//duplicate_hook
do_action( 'signup_hidden_fields', 'validate-user' );
?>
<?php show_user_form($user_name, $user_email, $errors); ?>
<p>
@ -432,7 +445,10 @@ function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_ti
<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
//duplicate_hook
do_action( 'signup_hidden_fields', 'validate-site' );
?>
<?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>