diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 3eba2668fa..4f5f2ff70d 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -938,6 +938,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) { * Adds "Add New" menu. * * @since 3.1.0 + * @since 6.5.0 Added a New Site link for network installations. * * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance. */ @@ -1008,6 +1009,17 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) { ) ); } + + if ( is_multisite() && current_user_can( 'create_sites' ) ) { + $wp_admin_bar->add_node( + array( + 'parent' => 'new-content', + 'id' => 'add-new-site', + 'title' => _x( 'Site', 'add new from admin bar' ), + 'href' => network_admin_url( 'site-new.php' ), + ) + ); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 931b67af2c..a275d33ad5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57599'; +$wp_version = '6.5-alpha-57600'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.