Ticket #18709: 18709.4.patch
File 18709.4.patch, 3.4 KB (added by , 11 years ago) |
---|
-
src/wp-admin/network/user-new.php
86 86 </div> 87 87 <?php } ?> 88 88 <form action="<?php echo network_admin_url('user-new.php?action=add-user'); ?>" id="adduser" method="post"> 89 <?php 90 //duplicate_hook 91 do_action( 'user_new_form_before', 'add-new-user' ); ?> 89 92 <table class="form-table"> 90 93 <tr class="form-field form-required"> 91 94 <th scope="row"><?php _e( 'Username' ) ?></th> … … 99 102 <td colspan="2"><?php _e( 'Username and password will be mailed to the above email address.' ) ?></td> 100 103 </tr> 101 104 </table> 105 <?php 106 //duplicate_hook 107 do_action( 'user_new_form_after', 'add-new-user' ); 108 ?> 102 109 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> 103 110 <?php submit_button( __('Add User'), 'primary', 'add-user' ); ?> 104 111 </form> -
src/wp-admin/user-new.php
290 290 <form action="" method="post" name="adduser" id="adduser" class="validate"<?php do_action('user_new_form_tag');?>> 291 291 <input name="action" type="hidden" value="adduser" /> 292 292 <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> 293 293 <?php 294 /** 295 * Fires before the new user form. 296 * 297 * Passes a contextual string to make both types of new user forms 298 * uniquely targetable. Contexts are 'add-existing-user' (Multisite), 299 * and 'add-new-user'. 300 * 301 * @since 3.7.0 302 * 303 * @param string A contextual string specifying which type of new user form the hook precedes. 304 */ 305 do_action( 'user_new_form_before', 'add-existing-user' ); 306 ?> 294 307 <table class="form-table"> 295 308 <tr class="form-field form-required"> 296 309 <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th> … … 310 323 </tr> 311 324 <?php } ?> 312 325 </table> 326 <?php 327 /** 328 * Fires after the new user form. 329 * 330 * Passes a contextual string to make both types of new user forms 331 * uniquely targetable. Contexts are 'add-existing-user' (Multisite), 332 * and 'add-new-user'. 333 * 334 * @since 3.7.0 335 * 336 * @param string A contextual string specifying which type of new user form the hook follows. 337 */ 338 do_action( 'user_new_form_after', 'add-existing-user' ); 339 ?> 313 340 <?php submit_button( __( 'Add Existing User '), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?> 314 341 </form> 315 342 <?php … … 325 352 ?> 326 353 <form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> 327 354 <input name="action" type="hidden" value="createuser" /> 328 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?>355 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?> 329 356 <?php 357 //duplicate_hook 358 do_action( 'user_new_form_before', 'add-new-user' ); 359 330 360 // Load up the passed data, else set to a default. 331 361 foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', 332 362 'email' => 'email', 'url' => 'uri', 'role' => 'role', 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass' ) as $post_field => $var ) { … … 412 442 <?php } ?> 413 443 </table> 414 444 445 <?php 446 //duplicate_hook 447 do_action( 'user_new_form_after', 'add-new-user' ); 448 ?> 449 415 450 <?php submit_button( __( 'Add New User '), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?> 416 451 417 452 </form>