Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions wp-multi-network/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,18 @@ function add_network( $args = array() ) {
return $new_blog_id;
}

/**
* Fires after a new network blog has been added.
*
* @param int $new_blog_id ID of the added network blog.
* @param int $new_network_id ID of the added network.
* @param array $r Full associative array of network arguments.
*
* @since 2.5.3
*/
do_action( 'added_network_blog', $new_blog_id, $new_network_id, $r );

// add new blog id as network meta data against the new network
$r['network_meta']['main_site'] = $new_blog_id;

if ( empty( $r['network_meta']['site_name'] ) ) {
Expand Down
8 changes: 8 additions & 0 deletions wp-multi-network/includes/metaboxes/edit-network.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function wpmn_edit_network_details_metabox( $network = null ) {
?>

<table class="edit-network form-table">
<?php do_action('wpmn_edit_network_details_metabox_before_group', $network); ?>

<tr class="form-field form-required">
<th scope="row">
<label for="domain"><?php esc_html_e( 'Domain', 'wp-multi-network' ); ?></label>
Expand All @@ -43,6 +45,8 @@ function wpmn_edit_network_details_metabox( $network = null ) {
<p class="description"><?php esc_html_e( 'Use "/" if you are unsure.', 'wp-multi-network' ); ?></p>
</td>
</tr>

<?php do_action('wpmn_edit_network_details_metabox_after_group', $network); ?>
</table>

<?php
Expand All @@ -57,6 +61,8 @@ function wpmn_edit_network_new_site_metabox() {
?>

<table class="edit-network form-table">
<?php do_action('wpmn_edit_network_new_site_metabox_before_group'); ?>

<tr class="form-field form-required">
<th scope="row">
<label for="new_site"><?php esc_html_e( 'Site Name', 'wp-multi-network' ); ?>:</label>
Expand All @@ -66,6 +72,8 @@ function wpmn_edit_network_new_site_metabox() {
<p class="description"><?php esc_html_e( 'A new site needs to be created at the root of this network.', 'wp-multi-network' ); ?></p>
</td>
</tr>

<?php do_action('wpmn_edit_network_new_site_metabox_after_group'); ?>
</table>

<?php
Expand Down