diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 55585dbfa5..6db6d188a8 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -1085,7 +1085,6 @@ table.form-table td .updated p { .form-table.permalink-structure .structure-selection .row > div { max-width: calc(100% - 24px); - margin-left: 4px; display: inline-flex; flex-direction: column; } diff --git a/src/wp-admin/options-permalink.php b/src/wp-admin/options-permalink.php index d80c551c70..71a654bc4b 100644 --- a/src/wp-admin/options-permalink.php +++ b/src/wp-admin/options-permalink.php @@ -57,8 +57,8 @@ get_current_screen()->add_help_tab( ); $help_sidebar_content = '
' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Permalinks Settings' ) . '
' . - '' . __( 'Documentation on Using Permalinks' ) . '
'; + '' . __( 'Documentation on Permalinks Settings' ) . '
' . + '' . __( 'Documentation on Using Permalinks' ) . '
'; if ( $is_nginx ) { $help_sidebar_content .= '' . __( 'Documentation on Nginx configuration.' ) . '
'; @@ -73,10 +73,11 @@ $home_path = get_home_path(); $iis7_permalinks = iis7_supports_permalinks(); $permalink_structure = get_option( 'permalink_structure' ); -$prefix = ''; -$blog_prefix = ''; +$index_php_prefix = ''; +$blog_prefix = ''; + if ( ! got_url_rewrite() ) { - $prefix = '/index.php'; + $index_php_prefix = '/index.php'; } /* @@ -85,7 +86,9 @@ if ( ! got_url_rewrite() ) { * network. If the `permalink_structure` option has been changed to remove this * base prefix, WordPress core can no longer account for the possible collision. */ -if ( is_multisite() && ! is_subdomain_install() && is_main_site() && 0 === strpos( $permalink_structure, '/blog/' ) ) { +if ( is_multisite() && ! is_subdomain_install() && is_main_site() + && 0 === strpos( $permalink_structure, '/blog/' ) +) { $blog_prefix = '/blog'; } @@ -107,8 +110,9 @@ if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) if ( ! empty( $permalink_structure ) ) { $permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) ); - if ( $prefix && $blog_prefix ) { - $permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure ); + + if ( $index_php_prefix && $blog_prefix ) { + $permalink_structure = $index_php_prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure ); } else { $permalink_structure = $blog_prefix . $permalink_structure; } @@ -143,7 +147,9 @@ if ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) } if ( $iis7_permalinks ) { - if ( ( ! file_exists( $home_path . 'web.config' ) && win_is_writable( $home_path ) ) || win_is_writable( $home_path . 'web.config' ) ) { + if ( ( ! file_exists( $home_path . 'web.config' ) + && win_is_writable( $home_path ) ) || win_is_writable( $home_path . 'web.config' ) + ) { $writable = true; } else { $writable = false; @@ -151,7 +157,9 @@ if ( $iis7_permalinks ) { } elseif ( $is_nginx ) { $writable = false; } else { - if ( ( ! file_exists( $home_path . '.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) ) { + if ( ( ! file_exists( $home_path . '.htaccess' ) + && is_writable( $home_path ) ) || is_writable( $home_path . '.htaccess' ) + ) { $writable = true; } else { $writable = false; @@ -211,172 +219,214 @@ require_once ABSPATH . 'wp-admin/admin-header.php'; - + + -+
/<configuration>/<system.webServer>/<rewrite>/<rules>' ); ?> -
- -+
+ +web.config' ); ?> -
- -+
+ +
+ Error: The root directory of your site is not writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ),
+ __( 'https://wordpress.org/support/article/changing-file-permissions/' ),
+ 'web.config',
+ 'Ctrl + A',
+ '⌘ + A'
+ );
+ ?>
+
+ web.config' + ); + ?> +
+ + + + +
Error: The root directory of your site is not writable, so creating a file automatically was not possible. This is the URL rewrite rule you should have in your %2$s file. Create a new file called %2$s in the root directory of your site. Click in the field and press %3$s (or %4$s on Mac) to select all. Then insert this code into the %2$s file.' ),
+ /* translators: 1: .htaccess, 2: Documentation URL, 3: Ctrl + A, 4: ⌘ + A */
+ __( 'Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ),
+ '.htaccess',
__( 'https://wordpress.org/support/article/changing-file-permissions/' ),
- 'web.config',
'Ctrl + A',
'⌘ + A'
);
?>
-
- web.config' - ); - ?> -
- - - -
- Error: Your %1$s file is not writable, so updating it automatically was not possible. These are the mod_rewrite rules you should have in your %1$s file. Click in the field and press %3$s (or %4$s on Mac) to select all.' ),
- '.htaccess',
- __( 'https://wordpress.org/support/article/changing-file-permissions/' ),
- 'Ctrl + A',
- '⌘ + A'
- );
- ?>
-