Make WordPress Core

Ticket #15389: ticket.15389.network-forms-hooks.diff

File ticket.15389.network-forms-hooks.diff, 2.7 KB (added by ptahdunbar, 14 years ago)

This patch uses the hooks approach

  • wp-admin/network/site-new.php

     
    104104} ?>
    105105<form method="post" action="<?php echo network_admin_url('site-new.php?action=add-site'); ?>">
    106106<?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?>
    107         <table class="form-table">
    108                 <tr class="form-field form-required">
     107        <table id="add-new-site-table" class="form-table">
     108                <tr id="site-domain" class="form-field form-required">
    109109                        <th scope="row"><?php _e( 'Site Address' ) ?></th>
    110110                        <td>
    111111                        <?php if ( is_subdomain_install() ) { ?>
     
    117117                        ?>
    118118                        </td>
    119119                </tr>
    120                 <tr class="form-field form-required">
     120                <tr id="site-title" class="form-field form-required">
    121121                        <th scope="row"><?php _e( 'Site Title' ) ?></th>
    122122                        <td><input name="blog[title]" type="text" class="regular-text" title="<?php _e( 'Title' ) ?>"/></td>
    123123                </tr>
    124                 <tr class="form-field form-required">
     124                <tr id="site-email" class="form-field form-required">
    125125                        <th scope="row"><?php _e( 'Admin Email' ) ?></th>
    126126                        <td><input name="blog[email]" type="text" class="regular-text" title="<?php _e( 'Email' ) ?>"/></td>
    127127                </tr>
    128                 <tr class="form-field">
     128                <?php do_action( 'wpms_new_site_form' ); ?>
     129                <tr id="site-notice" class="form-field">
    129130                        <td colspan="2"><?php _e( 'A new user will be created if the above email address is not in the database.' ) ?><br /><?php _e( 'The username and password will be mailed to this email address.' ) ?></td>
    130131                </tr>
    131132        </table>
  • wp-admin/network/user-new.php

     
    6363                echo '<div id="message" class="updated"><p>' . $msg . '</p></div>';
    6464} ?>
    6565        <form action="<?php echo network_admin_url('user-new.php?action=add-user'); ?>" id="adduser" method="post">     
    66         <table class="form-table">
    67                 <tr class="form-field form-required">
     66        <table id="add-new-user-table" class="form-table">
     67                <tr id="user-username" class="form-field form-required">
    6868                        <th scope="row"><?php _e( 'Username' ) ?></th>
    6969                        <td><input type="text" class="regular-text" name="user[username]" /></td>
    7070                </tr>
    71                 <tr class="form-field form-required">
     71                <tr id="user-email" class="form-field form-required">
    7272                        <th scope="row"><?php _e( 'Email' ) ?></th>
    7373                        <td><input type="text" class="regular-text" name="user[email]" /></td>
    7474                </tr>
    75                 <tr class="form-field">
     75                <?php do_action( 'wpms_new_user_form' ); ?>
     76                <tr id="user-notice" class="form-field">
    7677                        <td colspan="2"><?php _e( 'Username and password will be mailed to the above email address.' ) ?></td>
    7778                </tr>
    7879        </table>