WordPress.org

Make WordPress Core

Changeset 25629


Ignore:
Timestamp:
09/26/13 01:47:42 (4 years ago)
Author:
helen
Message:

Add a user_new_form hook, with context. props johnjamesjacoby, strangerstudios, jeremyfelt, DrewAPicture. fixes #18709.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/user-new.php

    r25616 r25629  
    100100        </tr> 
    101101    </table> 
     102    <?php 
     103    //duplicate_hook 
     104    do_action( 'user_new_form', 'add-new-user' ); 
     105    ?> 
    102106    <?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?> 
    103107    <?php submit_button( __('Add User'), 'primary', 'add-user' ); ?> 
  • trunk/src/wp-admin/user-new.php

    r25616 r25629  
    311311<?php } ?> 
    312312</table> 
     313<?php 
     314/** 
     315 * Fires at the end of the new user form. 
     316 * 
     317 * Passes a contextual string to make both types of new user forms 
     318 * uniquely targetable. Contexts are 'add-existing-user' (Multisite), 
     319 * and 'add-new-user' (single site and network admin). 
     320 * 
     321 * @since 3.7.0 
     322 * 
     323 * @param string A contextual string specifying which type of new user form the hook follows. 
     324 */ 
     325do_action( 'user_new_form', 'add-existing-user' ); 
     326?> 
    313327<?php submit_button( __( 'Add Existing User '), 'primary', 'adduser', true, array( 'id' => 'addusersub' ) ); ?> 
    314328</form> 
     
    326340<form action="" method="post" name="createuser" id="createuser" class="validate"<?php do_action('user_new_form_tag');?>> 
    327341<input name="action" type="hidden" value="createuser" /> 
    328 <?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?> 
     342<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ); ?> 
    329343<?php 
    330344// Load up the passed data, else set to a default. 
     
    413427</table> 
    414428 
     429<?php 
     430//duplicate_hook 
     431do_action( 'user_new_form', 'add-new-user' ); 
     432?> 
     433 
    415434<?php submit_button( __( 'Add New User '), 'primary', 'createuser', true, array( 'id' => 'createusersub' ) ); ?> 
    416435 
Note: See TracChangeset for help on using the changeset viewer.