Merged in feature/from-pantheon (pull request #16)

code from pantheon

* code from pantheon
This commit is contained in:
Tony Volpe
2024-01-10 17:03:02 +00:00
parent 054b4fffc9
commit 4eb982d7a8
16492 changed files with 3475854 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* Network Setup
*
* @package pantheon-mu-plugin
*/
namespace Pantheon\NetworkSetup;
/**
* Alter network setup pages to include Pantheon-specific instructions.
*/
/**
* Replace the WordPress core Network Setup page from the Settings menu.
*/
function pantheon_remove_network_setup() {
global $submenu;
if ( isset( $submenu['tools.php'][50] ) ) {
unset( $submenu['tools.php'][50] );
}
}
/**
* Register the Pantheon network setup submenu page.
*/
function pantheon_add_network_setup() {
add_management_page(
__( 'Create a Network of WordPress Sites', 'network-setup' ),
__( 'Network Setup', 'network-setup' ),
'setup_network',
'setup_network',
__NAMESPACE__ . '\\pantheon_render_network_setup_page'
);
}
/**
* Render the Pantheon network setup page.
*/
function pantheon_render_network_setup_page() {
global $wpdb;
require_once __DIR__ . '/network/network.php';
}
add_action( 'admin_menu', __NAMESPACE__ . '\\pantheon_remove_network_setup' );
add_action( 'admin_menu', __NAMESPACE__ . '\\pantheon_add_network_setup' );