Skip to content

Commit c113ae0

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60537 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3809c22 commit c113ae0

25 files changed

+45
-45
lines changed

src/wp-content/themes/twentytwentyone/assets/js/customize-helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Get luminance from a HEX color.
2+
* Gets luminance from a HEX color.
33
*
44
* @since Twenty Twenty-One 1.0
55
*
@@ -13,7 +13,7 @@ function twentytwentyoneGetHexLum( hex ) { // jshint ignore:line
1313
}
1414

1515
/**
16-
* Get RGB from HEX.
16+
* Gets RGB from HEX.
1717
*
1818
* @since Twenty Twenty-One 1.0
1919
*

src/wp-content/themes/twentytwentyone/assets/js/editor-dark-mode-support.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ if ( document.body.classList.contains( 'twentytwentyone-supports-dark-theme' ) )
66
}
77

88
/**
9-
* Once the editor loads, add the dark mode class.
9+
* Adds the dark mode class once the editor loads.
1010
*
11-
* Wait for the editor to load by periodically checking for an element, then we add the classes.
11+
* Waits for the editor to load by periodically checking for an element, then adds the classes.
1212
*
1313
* @since Twenty Twenty-One 1.0
1414
*

src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
/**
8-
* Toggle an attribute's value
8+
* Toggles an attribute's value
99
*
1010
* @since Twenty Twenty-One 1.0
1111
*
@@ -66,7 +66,7 @@ function twentytwentyoneSubmenuPosition( li ) {
6666
}
6767

6868
/**
69-
* Handle clicks on submenu toggles.
69+
* Handles clicks on submenu toggles.
7070
*
7171
* @since Twenty Twenty-One 1.0
7272
*
@@ -134,7 +134,7 @@ function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
134134
} );
135135

136136
/**
137-
* Trap keyboard navigation in the menu modal.
137+
* Traps keyboard navigation in the menu modal.
138138
* Adapted from Twenty Twenty.
139139
*
140140
* @since Twenty Twenty-One 1.0
@@ -180,7 +180,7 @@ function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line
180180
} );
181181

182182
/**
183-
* Close menu and scroll to anchor when an anchor link is clicked.
183+
* Closes menu and scrolls to anchor when an anchor link is clicked.
184184
* Adapted from Twenty Twenty.
185185
*
186186
* @since Twenty Twenty-One 1.1

src/wp-content/themes/twentytwentyone/assets/js/responsive-embeds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
/**
8-
* Add max-width & max-height to <iframe> elements, depending on their width & height props.
8+
* Adds max-width & max-height to <iframe> elements, depending on their width & height props.
99
*
1010
* @since Twenty Twenty-One 1.0
1111
*

src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class Twenty_Twenty_One_Custom_Colors {
1414

1515
/**
16-
* Instantiate the object.
16+
* Instantiates the object.
1717
*
1818
* @since Twenty Twenty-One 1.0
1919
*/
@@ -30,7 +30,7 @@ public function __construct() {
3030
}
3131

3232
/**
33-
* Determine the luminance of the given color and then return #fff or #000 so that the text is always readable.
33+
* Determines the luminance of the given color and then returns #fff or #000 so that the text is always readable.
3434
*
3535
* @since Twenty Twenty-One 1.0
3636
*
@@ -42,9 +42,9 @@ public function custom_get_readable_color( $background_color ) {
4242
}
4343

4444
/**
45-
* Generate color variables.
45+
* Generates color variables.
4646
*
47-
* Adjust the color value of the CSS variables depending on the background color theme mod.
47+
* Adjusts the color value of the CSS variables depending on the background color theme mod.
4848
* Both text and link colors needs to be updated.
4949
* The code below needs to be updated, because the colors are no longer theme mods.
5050
*
@@ -111,7 +111,7 @@ public function editor_custom_color_variables() {
111111
}
112112

113113
/**
114-
* Get luminance from a HEX color.
114+
* Gets luminance from a HEX color.
115115
*
116116
* @static
117117
*

src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize-color-control.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr
2525
public $type = 'twenty-twenty-one-color';
2626

2727
/**
28-
* Colorpicker palette
28+
* Colorpicker palette.
2929
*
3030
* @since Twenty Twenty-One 1.0
3131
*
@@ -34,7 +34,7 @@ class Twenty_Twenty_One_Customize_Color_Control extends WP_Customize_Color_Contr
3434
public $palette;
3535

3636
/**
37-
* Enqueue control related scripts/styles.
37+
* Enqueues control related scripts/styles.
3838
*
3939
* @since Twenty Twenty-One 1.0
4040
*
@@ -54,7 +54,7 @@ public function enqueue() {
5454
}
5555

5656
/**
57-
* Refresh the parameters passed to the JavaScript via JSON.
57+
* Refreshes the parameters passed to the JavaScript via JSON.
5858
*
5959
* @since Twenty Twenty-One 1.0
6060
*

src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class Twenty_Twenty_One_Customize {
1717

1818
/**
19-
* Constructor. Instantiate the object.
19+
* Constructor. Instantiates the object.
2020
*
2121
* @since Twenty Twenty-One 1.0
2222
*/
@@ -25,7 +25,7 @@ public function __construct() {
2525
}
2626

2727
/**
28-
* Register customizer options.
28+
* Registers customizer options.
2929
*
3030
* @since Twenty Twenty-One 1.0
3131
*
@@ -144,7 +144,7 @@ public function register( $wp_customize ) {
144144
}
145145

146146
/**
147-
* Sanitize boolean for checkbox.
147+
* Sanitizes a boolean for checkbox.
148148
*
149149
* @since Twenty Twenty-One 1.0
150150
*
@@ -156,7 +156,7 @@ public static function sanitize_checkbox( $checked = null ) {
156156
}
157157

158158
/**
159-
* Render the site title for the selective refresh partial.
159+
* Renders the site title for the selective refresh partial.
160160
*
161161
* @since Twenty Twenty-One 1.0
162162
*
@@ -167,7 +167,7 @@ public function partial_blogname() {
167167
}
168168

169169
/**
170-
* Render the site tagline for the selective refresh partial.
170+
* Renders the site tagline for the selective refresh partial.
171171
*
172172
* @since Twenty Twenty-One 1.0
173173
*

src/wp-content/themes/twentytwentyone/image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<figure class="wp-block-image">
2323
<?php
2424
/**
25-
* Filter the default image attachment size.
25+
* Filters the default image attachment size.
2626
*
2727
* @since Twenty Twenty-One 1.0
2828
*

src/wp-content/themes/twentytwentyone/inc/back-compat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/**
15-
* Display upgrade notice on theme switch.
15+
* Displays upgrade notice on theme switch.
1616
*
1717
* @since Twenty Twenty-One 1.0
1818
*

src/wp-content/themes/twentytwentyone/inc/block-patterns.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
if ( function_exists( 'register_block_pattern_category' ) ) {
1414
/**
15-
* Register Block Pattern Category.
15+
* Registers Block Pattern Category.
1616
*
1717
* @since Twenty Twenty-One 1.0
1818
*
@@ -32,7 +32,7 @@ function twenty_twenty_one_register_block_pattern_category() {
3232
*/
3333
if ( function_exists( 'register_block_pattern' ) ) {
3434
/**
35-
* Register Block Pattern.
35+
* Registers Block Pattern.
3636
*
3737
* @since Twenty Twenty-One 1.0
3838
*

0 commit comments

Comments
 (0)