From c94722d9bc0109127a450a55d0ff0e2d306dc2b1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 2 Feb 2020 02:42:04 +0000 Subject: [PATCH] Docs: Improve inline comments in `wp-admin/options.php` per the documentation standards. See #48303. Built from https://develop.svn.wordpress.org/trunk@47159 git-svn-id: http://core.svn.wordpress.org/trunk@46959 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/options.php | 14 +++++--------- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/wp-admin/options.php b/wp-admin/options.php index 2d7eddd632..2961208898 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -204,10 +204,7 @@ if ( ! is_multisite() ) { */ $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); -/* - * If $_GET['action'] == 'update' we are saving settings sent from a settings page - */ -if ( 'update' == $action ) { +if ( 'update' == $action ) { // We are saving settings sent from a settings page. if ( 'options' == $option_page && ! isset( $_POST['option_page'] ) ) { // This is for back compat and will eventually be removed. $unregistered = true; check_admin_referer( 'update-options' ); @@ -303,18 +300,17 @@ if ( 'update' == $action ) { } } - /** - * Handle settings errors and return to options page + /* + * Handle settings errors and return to options page. */ + // If no settings errors were registered add a general 'updated' message. if ( ! count( get_settings_errors() ) ) { add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' ); } set_transient( 'settings_errors', get_settings_errors(), 30 ); - /** - * Redirect back to the settings page that was submitted - */ + // Redirect back to the settings page that was submitted. $goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() ); wp_redirect( $goback ); exit; diff --git a/wp-includes/version.php b/wp-includes/version.php index e54001519e..c770de9400 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-47158'; +$wp_version = '5.4-alpha-47159'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.