Permalinks: Simplify the logic for displaying "You should update your `.htaccess` file now" message.
See #39547, #50834. Built from https://develop.svn.wordpress.org/trunk@48712 git-svn-id: http://core.svn.wordpress.org/trunk@48474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9cf1ba365
commit
0a76cb6240
|
@ -160,26 +160,28 @@ $using_index_permalinks = $wp_rewrite->using_index_permalinks();
|
||||||
if ( $structure_updated ) {
|
if ( $structure_updated ) {
|
||||||
$message = __( 'Permalink structure updated.' );
|
$message = __( 'Permalink structure updated.' );
|
||||||
|
|
||||||
if ( $iis7_permalinks ) {
|
if ( $permalink_structure && ! $using_index_permalinks ) {
|
||||||
if ( $permalink_structure && ! $using_index_permalinks && ! $writable ) {
|
if ( $iis7_permalinks ) {
|
||||||
|
if ( ! $writable ) {
|
||||||
|
$message = sprintf(
|
||||||
|
/* translators: %s: web.config */
|
||||||
|
__( 'You should update your %s file now.' ),
|
||||||
|
'<code>web.config</code>'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$message = sprintf(
|
||||||
|
/* translators: %s: web.config */
|
||||||
|
__( 'Permalink structure updated. Remove write access on %s file now!' ),
|
||||||
|
'<code>web.config</code>'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} elseif ( ! $is_nginx && $htaccess_update_required && ! $writable ) {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
/* translators: %s: web.config */
|
/* translators: %s: .htaccess */
|
||||||
__( 'You should update your %s file now.' ),
|
__( 'You should update your %s file now.' ),
|
||||||
'<code>web.config</code>'
|
'<code>.htaccess</code>'
|
||||||
);
|
|
||||||
} elseif ( $permalink_structure && ! $using_index_permalinks && $writable ) {
|
|
||||||
$message = sprintf(
|
|
||||||
/* translators: %s: web.config */
|
|
||||||
__( 'Permalink structure updated. Remove write access on %s file now!' ),
|
|
||||||
'<code>web.config</code>'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ( ! $is_nginx && $permalink_structure && ! $using_index_permalinks && ! $writable && $htaccess_update_required ) {
|
|
||||||
$message = sprintf(
|
|
||||||
/* translators: %s: .htaccess */
|
|
||||||
__( 'You should update your %s file now.' ),
|
|
||||||
'<code>.htaccess</code>'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! get_settings_errors() ) {
|
if ( ! get_settings_errors() ) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-48711';
|
$wp_version = '5.6-alpha-48712';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue