-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detects if a user is using the correct upstream and framework and giv…
…e them appropriate next steps to finalize WPMS setup. (#21) * Update pantheon.php to declare WP_ALLOW_MULTISITE before loading network config * Detects if a user is using the correct upstream and framework and give them appropriate next steps to finalize WPMS setup.
- Loading branch information
1 parent
a185eeb
commit 5ac00de
Showing
2 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
<?php | ||
/* | ||
/** | ||
* If a site has multisite enabled, but has not had the final installation | ||
* steps completed, alert the user and provide links. | ||
* | ||
* @package pantheon | ||
*/ | ||
|
||
function pantheon_multisite_install_finalize_message() { | ||
?> | ||
/** | ||
* Detects if a user is using the correct upstream and framework and give them appropriate next steps to finalize WPMS setup. | ||
* | ||
* @return void | ||
*/ | ||
function pantheon_multisite_install_finalize_message() { ?> | ||
<div class="notice notice-info is-dismissible"> | ||
<p><?php esc_html_e( 'Your WordPress Multisite is almost ready!', 'pantheon' ); ?></p> | ||
<p><?php echo sprintf( __( 'Visit <a href="%s">Pantheon Multisite Configuration</a> for documentation on how to finalize configuration of your site network.', 'pantheon' ), 'https://pantheon.io/docs/guides/multisite/config/#install-the-wordpress-site-network' ); ?></p> | ||
<?php | ||
if ( isset( $_ENV['PANTHEON_ENVIRONMENT'] ) ) { | ||
if ( getenv( 'FRAMEWORK' ) === 'wordpress_network' ) { | ||
?> | ||
<p><?php esc_html_e( 'Your WordPress Multisite is almost ready!', 'pantheon' ); ?></p> | ||
<p><?php echo sprintf( __( 'Visit <a href="%s">Pantheon Multisite Configuration</a> for documentation on how to finalize configuration of your site network.', 'pantheon' ), 'https://pantheon.io/docs/guides/multisite/config/#install-the-wordpress-site-network' ); ?></p> | ||
<?php | ||
} else { | ||
?> | ||
<p><?php esc_html_e( 'You are trying to configure a WordPress Multisite with a wrong upstream!', 'pantheon' ); ?></p> | ||
<p><?php echo sprintf( __( 'Make sure that you have the correct upstream configuration for WPMS. If you do not have that capability or check if you are eligible, please <a href="%s">Contact Support</a>.', 'pantheon' ), 'https://pantheon.io/support' ); ?></p> | ||
<?php | ||
} | ||
} | ||
?> | ||
</div> | ||
|
||
|
||
<?php | ||
} | ||
|
||
add_action('admin_notices', 'pantheon_multisite_install_finalize_message'); | ||
add_action( 'admin_notices', 'pantheon_multisite_install_finalize_message' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters