Ticket #34739: extend_site_new.patch
| File extend_site_new.patch, 1.8 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/network/site-new.php
110 110 do_action( 'network_site_new_created_user', $user_id ); 111 111 } 112 112 113 /** 114 * Filter metadata passed to wpmu_create_blog in Add New Site Admin Network Screen 115 * 116 * @since 117 * 118 * @param array $meta List of meta for the new blog. 119 * @param string $newdomain Domain of the new blog. 120 * @param string $path Path of the new blog. 121 * @param string $title Title of the new blog. 122 * @param int $user_id ID of the new blog administrator. 123 * @param int $current_site->id ID of the current Network. 124 */ 125 $meta = apply_filters( 'network_site_new_blog_meta', $meta, $newdomain, $path, $title, $user_id, $current_site->id ); 126 113 127 $wpdb->hide_errors(); 114 128 $id = wpmu_create_blog( $newdomain, $path, $title, $user_id, $meta, $current_site->id ); 115 129 $wpdb->show_errors(); 116 130 if ( ! is_wp_error( $id ) ) { 131 132 117 133 if ( ! is_super_admin( $user_id ) && !get_user_option( 'primary_blog', $user_id ) ) { 118 134 update_user_option( $user_id, 'primary_blog', $id, true ); 119 135 } … … 219 235 <tr class="form-field"> 220 236 <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> 221 237 </tr> 238 222 239 </table> 240 241 <?php 242 /** 243 * Fires after the Add New Site Admin Network Screen Form is rendered 244 * and before submit button is displayed and form tag is closed. 245 * 246 * Add you own custom fields here when creating new blogs in a network 247 * 248 * @since 249 */ 250 do_action( 'network_after_site_new_form' ); 251 ?> 252 223 253 <?php submit_button( __('Add Site'), 'primary', 'add-site' ); ?> 224 254 </form> 225 255 </div>