mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 21:30:26 +00:00
Administration: Apply admin notice functions in multisite.
Use `wp_get_admin_notice` and `wp_admin_notice` to handle multisite settings notices. Props costdev. See #57791. git-svn-id: https://develop.svn.wordpress.org/trunk@56409 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -125,11 +125,14 @@ function network_step1( $errors = false ) {
|
||||
|
||||
$active_plugins = get_option( 'active_plugins' );
|
||||
if ( ! empty( $active_plugins ) ) {
|
||||
echo '<div class="notice notice-warning"><p><strong>' . __( 'Warning:' ) . '</strong> ' . sprintf(
|
||||
/* translators: %s: URL to Plugins screen. */
|
||||
__( 'Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.' ),
|
||||
admin_url( 'plugins.php?plugin_status=active' )
|
||||
) . '</p></div>';
|
||||
wp_admin_notice(
|
||||
'<strong>' . __( 'Warning:' ) . '</strong> ' . sprintf(
|
||||
/* translators: %s: URL to Plugins screen. */
|
||||
__( 'Please <a href="%s">deactivate your plugins</a> before enabling the Network feature.' ),
|
||||
admin_url( 'plugins.php?plugin_status=active' )
|
||||
),
|
||||
array( 'type' => 'warning' )
|
||||
);
|
||||
echo '<p>' . __( 'Once the network is created, you may reactivate your plugins.' ) . '</p>';
|
||||
echo '</div>';
|
||||
require_once ABSPATH . 'wp-admin/admin-footer.php';
|
||||
@@ -438,35 +441,36 @@ function network_step2( $errors = false ) {
|
||||
?>
|
||||
<h3><?php esc_html_e( 'Enabling the Network' ); ?></h3>
|
||||
<p><?php _e( 'Complete the following steps to enable the features for creating a network of sites.' ); ?></p>
|
||||
<div class="notice notice-warning inline"><p>
|
||||
<?php
|
||||
$notice_message = '<strong>' . __( 'Caution:' ) . '</strong> ';
|
||||
$notice_args = array(
|
||||
'type' => 'warning',
|
||||
'additional_classes' => 'inline',
|
||||
);
|
||||
|
||||
if ( file_exists( $home_path . '.htaccess' ) ) {
|
||||
echo '<strong>' . __( 'Caution:' ) . '</strong> ';
|
||||
printf(
|
||||
$notice_message .= sprintf(
|
||||
/* translators: 1: wp-config.php, 2: .htaccess */
|
||||
__( 'You should back up your existing %1$s and %2$s files.' ),
|
||||
'<code>wp-config.php</code>',
|
||||
'<code>.htaccess</code>'
|
||||
);
|
||||
} elseif ( file_exists( $home_path . 'web.config' ) ) {
|
||||
echo '<strong>' . __( 'Caution:' ) . '</strong> ';
|
||||
printf(
|
||||
$notice_message .= sprintf(
|
||||
/* translators: 1: wp-config.php, 2: web.config */
|
||||
__( 'You should back up your existing %1$s and %2$s files.' ),
|
||||
'<code>wp-config.php</code>',
|
||||
'<code>web.config</code>'
|
||||
);
|
||||
} else {
|
||||
echo '<strong>' . __( 'Caution:' ) . '</strong> ';
|
||||
printf(
|
||||
$notice_message .= sprintf(
|
||||
/* translators: %s: wp-config.php */
|
||||
__( 'You should back up your existing %s file.' ),
|
||||
'<code>wp-config.php</code>'
|
||||
);
|
||||
}
|
||||
?>
|
||||
</p></div>
|
||||
<?php
|
||||
|
||||
wp_admin_notice( $notice_message, $notice_args );
|
||||
}
|
||||
?>
|
||||
<ol>
|
||||
|
||||
Reference in New Issue
Block a user