Skip to content
Open
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
14 changes: 12 additions & 2 deletions src/wp-admin/includes/network.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ function network_step1( $errors = false ) {
* @param false|WP_Error $errors Optional. Error object. Default false.
*/
function network_step2( $errors = false ) {
global $wpdb, $is_nginx;
global $wpdb, $is_nginx, $is_nginx_unit;

$hostname = get_clean_basedomain();
$slashed_home = trailingslashit( get_option( 'home' ) );
Expand Down Expand Up @@ -698,7 +698,17 @@ function network_step2( $errors = false ) {
);
echo '</p></li>';

else : // End $is_nginx. Construct an .htaccess file instead:
elseif ( $is_nginx_unit ) : // End $is_nginx, check for NGINX Unit:

echo '<li><p>';
printf(
/* translators: %s: Documentation URL. */
__( 'It seems your network is running within Nginx UNIT. <a href="%s">Learn more about further configuration</a>.' ),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this capitalization backwards?

Suggested change
__( 'It seems your network is running within Nginx UNIT. <a href="%s">Learn more about further configuration</a>.' ),
__( 'It seems your network is running within NGINX Unit. <a href="%s">Learn more about further configuration</a>.' ),

(https://unit.nginx.org/)

__( 'https://wordpress.org/documentation/article/nginx-unit/' )
);
echo '</p></li>';

else : // End $is_nginx_unit. Construct an .htaccess file instead:

$ms_files_rewriting = '';
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
Expand Down
9 changes: 8 additions & 1 deletion src/wp-includes/vars.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

global $pagenow,
$is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_edge,
$is_apache, $is_IIS, $is_iis7, $is_nginx, $is_caddy;
$is_apache, $is_IIS, $is_iis7, $is_nginx, $is_nginx_unit, $is_caddy;

// On which page are we?
if ( is_admin() ) {
Expand Down Expand Up @@ -126,6 +126,13 @@
*/
$is_nginx = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) );

/**
* Whether the server software is NGINX Unit or something else.
*
* @global bool $is_nginx_unit
*/
$is_nginx_unit = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Unit/' ) );

/**
* Whether the server software is Caddy or something else.
*
Expand Down