From ff0f83448457209abce0365ac130d6c18d9de429 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 4 Aug 2025 20:55:31 +0000 Subject: [PATCH] Twenty Twenty-One: Use third-person singular verbs for function descriptions. Reference: [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#documenting-tips PHP Documentation Standards: Documenting Tips]. Props vladimiraus, mukesh27, SergeyBiryukov. See #63692. Built from https://develop.svn.wordpress.org/trunk@60537 git-svn-id: http://core.svn.wordpress.org/trunk@59873 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../twentytwentyone/assets/js/customize-helpers.js | 4 ++-- .../assets/js/editor-dark-mode-support.js | 4 ++-- .../twentytwentyone/assets/js/primary-navigation.js | 8 ++++---- .../twentytwentyone/assets/js/responsive-embeds.js | 2 +- .../classes/class-twenty-twenty-one-custom-colors.php | 10 +++++----- ...class-twenty-twenty-one-customize-color-control.php | 6 +++--- .../classes/class-twenty-twenty-one-customize.php | 10 +++++----- wp-content/themes/twentytwentyone/image.php | 2 +- wp-content/themes/twentytwentyone/inc/back-compat.php | 2 +- .../themes/twentytwentyone/inc/block-patterns.php | 4 ++-- wp-content/themes/twentytwentyone/inc/block-styles.php | 2 +- wp-content/themes/twentytwentyone/inc/custom-css.php | 2 +- .../themes/twentytwentyone/inc/menu-functions.php | 2 +- .../themes/twentytwentyone/inc/template-functions.php | 10 +++++----- .../themes/twentytwentyone/inc/template-tags.php | 2 +- .../template-parts/excerpt/excerpt-aside.php | 2 +- .../template-parts/excerpt/excerpt-audio.php | 2 +- .../template-parts/excerpt/excerpt-chat.php | 2 +- .../template-parts/excerpt/excerpt-gallery.php | 2 +- .../template-parts/excerpt/excerpt-image.php | 2 +- .../template-parts/excerpt/excerpt-link.php | 2 +- .../template-parts/excerpt/excerpt-quote.php | 2 +- .../template-parts/excerpt/excerpt-status.php | 2 +- .../template-parts/excerpt/excerpt-video.php | 2 +- .../twentytwentyone/template-parts/excerpt/excerpt.php | 2 +- wp-includes/version.php | 2 +- 26 files changed, 46 insertions(+), 46 deletions(-) diff --git a/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js b/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js index 6678c3d9d9..bff50e5fa7 100644 --- a/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js +++ b/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js @@ -1,5 +1,5 @@ /** - * Get luminance from a HEX color. + * Gets luminance from a HEX color. * * @since Twenty Twenty-One 1.0 * @@ -13,7 +13,7 @@ function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line } /** - * Get RGB from HEX. + * Gets RGB from HEX. * * @since Twenty Twenty-One 1.0 * diff --git a/wp-content/themes/twentytwentyone/assets/js/editor-dark-mode-support.js b/wp-content/themes/twentytwentyone/assets/js/editor-dark-mode-support.js index 088ecad446..d4214341b0 100644 --- a/wp-content/themes/twentytwentyone/assets/js/editor-dark-mode-support.js +++ b/wp-content/themes/twentytwentyone/assets/js/editor-dark-mode-support.js @@ -6,9 +6,9 @@ if ( document.body.classList.contains( 'twentytwentyone-supports-dark-theme' ) ) } /** - * Once the editor loads, add the dark mode class. + * Adds the dark mode class once the editor loads. * - * Wait for the editor to load by periodically checking for an element, then we add the classes. + * Waits for the editor to load by periodically checking for an element, then adds the classes. * * @since Twenty Twenty-One 1.0 * diff --git a/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js b/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js index 313a14a147..36fe79bac2 100644 --- a/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js +++ b/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js @@ -5,7 +5,7 @@ */ /** - * Toggle an attribute's value + * Toggles an attribute's value * * @since Twenty Twenty-One 1.0 * @@ -66,7 +66,7 @@ function twentytwentyoneSubmenuPosition( li ) { } /** - * Handle clicks on submenu toggles. + * Handles clicks on submenu toggles. * * @since Twenty Twenty-One 1.0 * @@ -134,7 +134,7 @@ function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line } ); /** - * Trap keyboard navigation in the menu modal. + * Traps keyboard navigation in the menu modal. * Adapted from Twenty Twenty. * * @since Twenty Twenty-One 1.0 @@ -180,7 +180,7 @@ function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line } ); /** - * Close menu and scroll to anchor when an anchor link is clicked. + * Closes menu and scrolls to anchor when an anchor link is clicked. * Adapted from Twenty Twenty. * * @since Twenty Twenty-One 1.1 diff --git a/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js b/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js index 2beed6ef25..de934960f7 100644 --- a/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js +++ b/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js @@ -5,7 +5,7 @@ */ /** - * Add max-width & max-height to