diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/options.php | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-upstream.tar.xz wordpress-upstream.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/options.php')
-rw-r--r-- | wp-admin/options.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/wp-admin/options.php b/wp-admin/options.php index 33779a7..6916e2e 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -23,7 +23,8 @@ $title = __( 'Settings' ); $this_file = 'options.php'; $parent_file = 'options-general.php'; -wp_reset_vars( array( 'action', 'option_page' ) ); +$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : ''; +$option_page = ! empty( $_REQUEST['option_page'] ) ? sanitize_text_field( $_REQUEST['option_page'] ) : ''; $capability = 'manage_options'; @@ -159,7 +160,7 @@ $allowed_options['privacy'] = array(); $mail_options = array( 'mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass' ); -if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ), true ) ) { +if ( ! is_utf8_charset() ) { $allowed_options['reading'][] = 'blog_charset'; } @@ -180,7 +181,9 @@ if ( ! is_multisite() ) { $allowed_options['general'][] = 'default_role'; $allowed_options['writing'] = array_merge( $allowed_options['writing'], $mail_options ); - $allowed_options['writing'][] = 'ping_sites'; + if ( '1' === get_option( 'blog_public' ) ) { + $allowed_options['writing'][] = 'ping_sites'; + } $allowed_options['media'][] = 'uploads_use_yearmonth_folders'; @@ -321,9 +324,10 @@ if ( 'update' === $action ) { // We are saving settings sent from a settings pag 'options.php', '2.7.0', sprintf( - /* translators: %s: The option/setting. */ - __( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://developer.wordpress.org/plugins/settings/settings-api/' ), - '<code>' . esc_html( $option ) . '</code>' + /* translators: 1: The option/setting, 2: Documentation URL. */ + __( 'The %1$s setting is unregistered. Unregistered settings are deprecated. See <a href="%2$s">documentation on the Settings API</a>.' ), + '<code>' . esc_html( $option ) . '</code>', + __( 'https://developer.wordpress.org/plugins/settings/settings-api/' ) ) ); } |