diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/options-permalink.php --- a/wp/wp-admin/options-permalink.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/options-permalink.php Tue Dec 15 13:49:49 2020 +0100 @@ -7,7 +7,7 @@ */ /** WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); +require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); @@ -31,8 +31,17 @@ 'id' => 'permalink-settings', 'title' => __( 'Permalink Settings' ), 'content' => '
' . __( 'Permalinks can contain useful information, such as the post date, title, or other elements. You can choose from any of the suggested permalink formats, or you can craft your own if you select Custom Structure.' ) . '
' . - '' . __( 'If you pick an option other than Plain, your general URL path with structure tags (terms surrounded by %
) will also appear in the custom structure field and your path can be further modified there.' ) . '
' . __( 'When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes %category%
or %tag%
.' ) . '
' . sprintf(
+ /* translators: %s: Percent sign (%). */
+ __( 'If you pick an option other than Plain, your general URL path with structure tags (terms surrounded by %s) will also appear in the custom structure field and your path can be further modified there.' ),
+ '%
'
+ ) . '
' . sprintf(
+ /* translators: 1: %category%, 2: %tag% */
+ __( 'When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes %1$s or %2$s.' ),
+ '%category%
',
+ '%tag%
'
+ ) . '
' . __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.' ) . '
', ) ); @@ -48,8 +57,8 @@ get_current_screen()->set_help_sidebar( '' . __( 'For more information:' ) . '
' . - '' . __( 'Documentation on Permalinks Settings' ) . '
' . - '' . __( 'Documentation on Using Permalinks' ) . '
' . + '' . __( 'Documentation on Permalinks Settings' ) . '
' . + '' . __( 'Documentation on Using Permalinks' ) . '
' . '' . __( 'Support' ) . '
' ); @@ -57,7 +66,8 @@ $iis7_permalinks = iis7_supports_permalinks(); $permalink_structure = get_option( 'permalink_structure' ); -$prefix = $blog_prefix = ''; +$prefix = ''; +$blog_prefix = ''; if ( ! got_url_rewrite() ) { $prefix = '/index.php'; } @@ -141,16 +151,28 @@ if ( $iis7_permalinks ) { if ( $permalink_structure && ! $using_index_permalinks && ! $writable ) { - $message = __( 'You should update your web.config now.' ); + $message = sprintf( + /* translators: %s: web.config */ + __( 'You should update your %s file now.' ), + 'web.config
'
+ );
} elseif ( $permalink_structure && ! $using_index_permalinks && $writable ) {
- $message = __( 'Permalink structure updated. Remove write access on web.config file now!' );
+ $message = sprintf(
+ /* translators: %s: web.config */
+ __( 'Permalink structure updated. Remove write access on %s file now!' ),
+ 'web.config
'
+ );
}
} elseif ( ! $is_nginx && $permalink_structure && ! $using_index_permalinks && ! $writable && $update_required ) {
- $message = __( 'You should update your .htaccess now.' );
+ $message = sprintf(
+ /* translators: %s: .htaccess */
+ __( 'You should update your %s file now.' ),
+ '.htaccess
'
+ );
}
if ( ! get_settings_errors() ) {
- add_settings_error( 'general', 'settings_updated', $message, 'updated' );
+ add_settings_error( 'general', 'settings_updated', $message, 'success' );
}
set_transient( 'settings_errors', get_settings_errors(), 30 );
@@ -161,7 +183,7 @@
flush_rewrite_rules();
-require( ABSPATH . 'wp-admin/admin-header.php' );
+require_once ABSPATH . 'wp-admin/admin-header.php';
?>
number of tags are available, and here are some examples to get you started.' ), - __( 'https://codex.wordpress.org/Using_Permalinks' ) + __( 'https://wordpress.org/support/article/using-permalinks/' ) ); ?>
@@ -202,11 +224,11 @@
topics as your category base would make your category links like %s/topics/uncategorized/
. If you leave these blank the defaults will be used.' ), get_option( 'home' ) . $blog_prefix . $prefix );
?>