From 665719b9dec1a287b887f6d5b33659621794cb5b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 23 Nov 2022 15:43:13 +0000 Subject: [PATCH] =?UTF-8?q?Docs:=20Revise=20comments=20using=20=E2=80=9Cwe?= =?UTF-8?q?=E2=80=9D=20in=20WordPress=20root=20directory=20files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates some inline comments to better match the guidelines and recommendations set forth in the make/core and make/docs handbooks: > In general, use second person in your documentation. Second person depicts a friendly tone, with a perfect focus on the reader. In addition to this, directly addressing the reader helps avoid passive voice; thereby preventing unwanted confusion. > ... > the word “we” should be avoided (...) unless its made very clear which group is speaking. Includes: * Replacing first-person usage of "we" with second person point of view. * Making small clarification adjustments where the voice is much too casual or lacks clear context, especially for non-native English speakers. References: * [https://make.wordpress.org/docs/style-guide/language-grammar/grammatical-person/ Style Guide: Grammatical person] * [https://make.wordpress.org/docs/handbook/documentation-team-handbook/handbooks-style-and-formatting-guide/ Handbooks & HelpHub Style and Formatting Guide] * [https://make.wordpress.org/core/handbook/best-practices/post-comment-guidelines/#style-and-substance Post & Comment Guidelines: Style and Substance] Follow-up to [2176], [3430], [4676], [6009], [7991], [12688], [12762], [26008], [28978], [44488], [44962], [51979], [53131], [53132], [53156], [53131], [54200]. Props ironprogrammer, costdev, jorbin, SergeyBiryukov. See #57052. Built from https://develop.svn.wordpress.org/trunk@54866 git-svn-id: http://core.svn.wordpress.org/trunk@54418 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-cron.php | 4 ++-- wp-includes/version.php | 2 +- wp-load.php | 6 +----- wp-login.php | 2 +- wp-mail.php | 2 +- wp-settings.php | 12 ++++++------ wp-trackback.php | 2 +- xmlrpc.php | 2 +- 8 files changed, 14 insertions(+), 18 deletions(-) diff --git a/wp-cron.php b/wp-cron.php index 164e4ef191..f4211d82cd 100644 --- a/wp-cron.php +++ b/wp-cron.php @@ -23,7 +23,7 @@ if ( ! headers_sent() ) { header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); } -/* Don't make the request block till we finish, if possible. */ +// Don't run cron until the request finishes, if possible. if ( PHP_VERSION_ID >= 70016 && function_exists( 'fastcgi_finish_request' ) ) { fastcgi_finish_request(); } elseif ( function_exists( 'litespeed_finish_request' ) ) { @@ -35,7 +35,7 @@ if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'DOING_CRON' ) ) { } /** - * Tell WordPress we are doing the cron task. + * Tell WordPress the cron task is running. * * @var bool */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 1e4120960c..d9ccefbabc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54865'; +$wp_version = '6.2-alpha-54866'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-load.php b/wp-load.php index 9e8241fef5..5b869566ac 100644 --- a/wp-load.php +++ b/wp-load.php @@ -68,11 +68,7 @@ if ( file_exists( ABSPATH . 'wp-config.php' ) ) { $path = wp_guess_url() . '/wp-admin/setup-config.php'; - /* - * We're going to redirect to setup-config.php. While this shouldn't result - * in an infinite loop, that's a silly thing to assume, don't you think? If - * we're traveling in circles, our last-ditch effort is "Need more help?" - */ + // Redirect to setup-config.php. if ( false === strpos( $_SERVER['REQUEST_URI'], 'setup-config' ) ) { header( 'Location: ' . $path ); exit; diff --git a/wp-login.php b/wp-login.php index f79385530c..a6a7bc8175 100644 --- a/wp-login.php +++ b/wp-login.php @@ -1244,7 +1244,7 @@ switch ( $action ) { ) ); } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) { - // If cookies are disabled, we can't log in even with a valid user and password. + // If cookies are disabled, the user can't log in even with a valid username and password. $user = new WP_Error( 'test_cookie', sprintf( diff --git a/wp-mail.php b/wp-mail.php index eab3e0cf9f..b37a88b885 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -231,7 +231,7 @@ for ( $i = 1; $i <= $count; $i++ ) { echo "\n" . $post_ID->get_error_message(); } - // We couldn't post, for whatever reason. Better move forward to the next email. + // The post wasn't inserted or updated, for whatever reason. Better move forward to the next email. if ( empty( $post_ID ) ) { continue; } diff --git a/wp-settings.php b/wp-settings.php index d80d79bb82..3ed93b2f36 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -19,8 +19,8 @@ define( 'WPINC', 'wp-includes' ); * Version information for the current WordPress release. * * These can't be directly globalized in version.php. When updating, - * we're including version.php from another installation and don't want - * these values to be overridden if already set. + * include version.php from another installation and don't override + * these values if already set. * * @global string $wp_version The WordPress version string. * @global int $wp_db_version WordPress database version. @@ -60,7 +60,7 @@ global $blog_id; // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE. wp_initial_constants(); -// Make sure we register the shutdown handler for fatal errors as soon as possible. +// Register the shutdown handler for fatal errors as soon as possible. wp_register_fatal_error_handler(); // WordPress calculates offsets from UTC. @@ -70,13 +70,13 @@ date_default_timezone_set( 'UTC' ); // Standardize $_SERVER variables across setups. wp_fix_server_vars(); -// Check if we're in maintenance mode. +// Check if the site is in maintenance mode. wp_maintenance(); // Start loading timer. timer_start(); -// Check if we're in WP_DEBUG mode. +// Check if WP_DEBUG mode is enabled. wp_debug_mode(); /** @@ -145,7 +145,7 @@ if ( is_multisite() ) { register_shutdown_function( 'shutdown_action_hook' ); -// Stop most of WordPress from being loaded if we just want the basics. +// Stop most of WordPress from being loaded if SHORTINIT is enabled. if ( SHORTINIT ) { return false; } diff --git a/wp-trackback.php b/wp-trackback.php index d7d1881417..7512e33fb4 100644 --- a/wp-trackback.php +++ b/wp-trackback.php @@ -76,7 +76,7 @@ if ( function_exists( 'mb_convert_encoding' ) ) { $blog_name = mb_convert_encoding( $blog_name, get_option( 'blog_charset' ), $charset ); } -// Now that mb_convert_encoding() has been given a swing, we need to escape these three. +// Escape values to use in the trackback. $title = wp_slash( $title ); $excerpt = wp_slash( $excerpt ); $blog_name = wp_slash( $blog_name ); diff --git a/xmlrpc.php b/xmlrpc.php index 341a6dc84d..ecac4c7c7a 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -12,7 +12,7 @@ */ define( 'XMLRPC_REQUEST', true ); -// Some browser-embedded clients send cookies. We don't want them. +// Discard unneeded cookies sent by some browser-embedded clients. $_COOKIE = array(); // $HTTP_RAW_POST_DATA was deprecated in PHP 5.6 and removed in PHP 7.0.