Skip to content

Commit 3809c22

Browse files
Twenty Twenty: 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@60536 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f2748b9 commit 3809c22

12 files changed

+48
-47
lines changed

src/wp-content/themes/twentytwenty/assets/js/color-calculations.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
4949
} ),
5050
item,
5151
/**
52-
* Get a score for this color in contrast to its background color and surrounding text.
52+
* Gets a score for this color in contrast to its background color and surrounding text.
5353
*
5454
* @since Twenty Twenty 1.0
5555
*
@@ -110,7 +110,7 @@ _twentyTwentyColor.prototype.setAccentColorsArray = function() {
110110
};
111111

112112
/**
113-
* Get accessible text-color.
113+
* Gets accessible text-color.
114114
*
115115
* @since Twenty Twenty 1.0
116116
*
@@ -121,7 +121,7 @@ _twentyTwentyColor.prototype.getTextColor = function() {
121121
};
122122

123123
/**
124-
* Get accessible color for the defined accent-hue and background-color.
124+
* Gets accessible color for the defined accent-hue and background-color.
125125
*
126126
* @since Twenty Twenty 1.0
127127
*
@@ -141,7 +141,7 @@ _twentyTwentyColor.prototype.getAccentColor = function() {
141141
};
142142

143143
/**
144-
* Return a new instance of the _twentyTwentyColor object.
144+
* Returns a new instance of the _twentyTwentyColor object.
145145
*
146146
* @since Twenty Twenty 1.0
147147
*

src/wp-content/themes/twentytwenty/assets/js/customize-preview.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
( function( $, api, _ ) {
1111
/**
12-
* Return a value for our partial refresh.
12+
* Returns a value for our partial refresh.
1313
*
1414
* @since Twenty Twenty 1.0
1515
*
@@ -31,7 +31,7 @@
3131
api.selectiveRefresh.partialConstructor.cover_fixed = api.selectiveRefresh.Partial.extend( {
3232

3333
/**
34-
* Override the refresh method.
34+
* Overrides the refresh method.
3535
*
3636
* @since Twenty Twenty 1.0
3737
*
@@ -65,7 +65,7 @@
6565
attrs: {},
6666

6767
/**
68-
* Override the refresh method.
68+
* Overrides the refresh method.
6969
*
7070
* @since Twenty Twenty 1.0
7171
*
@@ -151,7 +151,7 @@
151151
} );
152152

153153
/**
154-
* Add styles to elements in the preview pane.
154+
* Adds styles to elements in the preview pane.
155155
*
156156
* @since Twenty Twenty 1.0
157157
*

src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

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

1818
/**
19-
* Register customizer options.
19+
* Registers customizer options.
2020
*
2121
* @since Twenty Twenty 1.0
2222
*
@@ -26,7 +26,7 @@ public static function register( $wp_customize ) {
2626

2727
/**
2828
* Site Title & Description.
29-
* */
29+
*/
3030
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
3131
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
3232

@@ -439,7 +439,7 @@ public static function sanitize_accent_accessible_colors( $value ) {
439439
}
440440

441441
/**
442-
* Sanitize select.
442+
* Sanitizes a select input.
443443
*
444444
* @since Twenty Twenty 1.0
445445
*
@@ -454,7 +454,7 @@ public static function sanitize_select( $input, $setting ) {
454454
}
455455

456456
/**
457-
* Sanitize boolean for checkbox.
457+
* Sanitizes a boolean for checkbox.
458458
*
459459
* @since Twenty Twenty 1.0
460460
*
@@ -476,7 +476,7 @@ public static function sanitize_checkbox( $checked ) {
476476
* */
477477
if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) {
478478
/**
479-
* Render the site title for the selective refresh partial.
479+
* Renders the site title for the selective refresh partial.
480480
*
481481
* @since Twenty Twenty 1.0
482482
*/
@@ -487,7 +487,7 @@ function twentytwenty_customize_partial_blogname() {
487487

488488
if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) {
489489
/**
490-
* Render the site description for the selective refresh partial.
490+
* Renders the site description for the selective refresh partial.
491491
*
492492
* @since Twenty Twenty 1.0
493493
*/
@@ -498,7 +498,7 @@ function twentytwenty_customize_partial_blogdescription() {
498498

499499
if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) {
500500
/**
501-
* Render the site logo for the selective refresh partial.
501+
* Renders the site logo for the selective refresh partial.
502502
*
503503
* Doing it this way so we don't have issues with `render_callback`'s arguments.
504504
*

src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
class TwentyTwenty_Non_Latin_Languages {
1919

2020
/**
21-
* Get custom CSS.
21+
* Gets custom CSS.
2222
*
23-
* Return CSS for non-latin language, if available, or null
23+
* Returns CSS for non-latin language, if available, or null.
2424
*
2525
* @since Twenty Twenty 1.0
2626
*

src/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818
class TwentyTwenty_Separator_Control extends WP_Customize_Control {
1919
/**
20-
* Render the hr.
20+
* Renders the hr.
2121
*
2222
* @since Twenty Twenty 1.0
2323
*/

src/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
if ( ! class_exists( 'TwentyTwenty_SVG_Icons' ) ) {
1111
/**
1212
* SVG ICONS CLASS
13-
* Retrieve the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
13+
* Retrieves the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
1414
*
1515
* @since Twenty Twenty 1.0
1616
*/
1717
class TwentyTwenty_SVG_Icons {
1818
/**
1919
* GET SVG CODE
20-
* Get the SVG code for the specified icon
20+
* Gets the SVG code for the specified icon.
2121
*
2222
* @since Twenty Twenty 1.0
2323
*
@@ -120,7 +120,7 @@ public static function get_social_link_svg( $uri ) {
120120

121121
/**
122122
* ICON STORAGE
123-
* Store the code for all SVGs in an array.
123+
* Stores the code for all SVGs in an array.
124124
*
125125
* @since Twenty Twenty 1.0
126126
* @var array

src/wp-content/themes/twentytwenty/functions.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function twentytwenty_theme_support() {
176176
require get_template_directory() . '/inc/custom-css.php';
177177

178178
/**
179-
* Register block patterns and pattern categories.
179+
* Registers block patterns and pattern categories.
180180
*
181181
* @since Twenty Twenty 2.8
182182
*/
@@ -187,7 +187,7 @@ function twentytwenty_register_block_patterns() {
187187
add_action( 'init', 'twentytwenty_register_block_patterns' );
188188

189189
/**
190-
* Register and Enqueue Styles.
190+
* Registers and Enqueues Styles.
191191
*
192192
* @since Twenty Twenty 1.0
193193
* @since Twenty Twenty 2.6 Enqueue the CSS file for the variable font.
@@ -215,7 +215,7 @@ function twentytwenty_register_styles() {
215215
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_styles' );
216216

217217
/**
218-
* Register and Enqueue Scripts.
218+
* Registers and Enqueues Scripts.
219219
*
220220
* @since Twenty Twenty 1.0
221221
*/
@@ -240,7 +240,7 @@ function twentytwenty_register_scripts() {
240240
add_action( 'wp_enqueue_scripts', 'twentytwenty_register_scripts' );
241241

242242
/**
243-
* Fix skip link focus in IE11.
243+
* Fixes skip link focus in IE11.
244244
*
245245
* This does not enqueue the script because it is tiny and because it is only for IE11,
246246
* thus it does not warrant having an entire dedicated blocking script being loaded.
@@ -260,7 +260,7 @@ function twentytwenty_skip_link_focus_fix() {
260260
}
261261

262262
/**
263-
* Enqueue non-latin language styles.
263+
* Enqueues non-latin language styles.
264264
*
265265
* @since Twenty Twenty 1.0
266266
*
@@ -277,7 +277,9 @@ function twentytwenty_non_latin_languages() {
277277
add_action( 'wp_enqueue_scripts', 'twentytwenty_non_latin_languages' );
278278

279279
/**
280-
* Register navigation menus uses wp_nav_menu in five places.
280+
* Registers navigation menus.
281+
*
282+
* This theme uses wp_nav_menu() in five places.
281283
*
282284
* @since Twenty Twenty 1.0
283285
*/
@@ -297,11 +299,11 @@ function twentytwenty_menus() {
297299
add_action( 'init', 'twentytwenty_menus' );
298300

299301
/**
300-
* Get the information about the logo.
302+
* Gets the information about the logo.
301303
*
302304
* @since Twenty Twenty 1.0
303305
*
304-
* @param string $html The HTML output from get_custom_logo (core function).
306+
* @param string $html The HTML output from get_custom_logo() (core function).
305307
* @return string
306308
*/
307309
function twentytwenty_get_custom_logo( $html ) {
@@ -356,7 +358,7 @@ function twentytwenty_get_custom_logo( $html ) {
356358
if ( ! function_exists( 'wp_body_open' ) ) {
357359

358360
/**
359-
* Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2.
361+
* Shim for wp_body_open(), ensuring backward compatibility with versions of WordPress older than 5.2.
360362
*
361363
* @since Twenty Twenty 1.0
362364
*/
@@ -385,7 +387,7 @@ function twentytwenty_skip_link() {
385387
add_action( 'wp_body_open', 'twentytwenty_skip_link', 5 );
386388

387389
/**
388-
* Register widget areas.
390+
* Registers widget areas.
389391
*
390392
* @since Twenty Twenty 1.0
391393
*
@@ -429,7 +431,7 @@ function twentytwenty_sidebar_registration() {
429431
add_action( 'widgets_init', 'twentytwenty_sidebar_registration' );
430432

431433
/**
432-
* Enqueue supplemental block editor styles.
434+
* Enqueues supplemental block editor styles.
433435
*
434436
* @since Twenty Twenty 1.0
435437
* @since Twenty Twenty 2.4 Removed a script related to the obsolete Squared style of Button blocks.
@@ -466,7 +468,7 @@ function twentytwenty_block_editor_styles() {
466468
}
467469

468470
/**
469-
* Enqueue classic editor styles.
471+
* Enqueues classic editor styles.
470472
*
471473
* @since Twenty Twenty 1.0
472474
* @since Twenty Twenty 2.6 Enqueue the CSS file for the variable font.
@@ -540,7 +542,7 @@ function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {
540542

541543
/**
542544
* Block Editor Settings.
543-
* Add custom colors and font sizes to the block editor.
545+
* Adds custom colors and font sizes to the block editor.
544546
*
545547
* @since Twenty Twenty 1.0
546548
*/
@@ -665,7 +667,7 @@ function twentytwenty_customize_controls_enqueue_scripts() {
665667
add_action( 'customize_controls_enqueue_scripts', 'twentytwenty_customize_controls_enqueue_scripts' );
666668

667669
/**
668-
* Enqueue scripts for the customizer preview.
670+
* Enqueues scripts for the customizer preview.
669671
*
670672
* @since Twenty Twenty 1.0
671673
*
@@ -691,7 +693,7 @@ function twentytwenty_customize_preview_init() {
691693
add_action( 'customize_preview_init', 'twentytwenty_customize_preview_init' );
692694

693695
/**
694-
* Get accessible color for an area.
696+
* Gets accessible color for an area.
695697
*
696698
* @since Twenty Twenty 1.0
697699
*
@@ -749,7 +751,7 @@ function twentytwenty_get_customizer_color_vars() {
749751
}
750752

751753
/**
752-
* Get an array of elements.
754+
* Gets an array of elements.
753755
*
754756
* @since Twenty Twenty 1.0
755757
*

src/wp-content/themes/twentytwenty/inc/custom-css.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if ( ! function_exists( 'twentytwenty_generate_css' ) ) {
1111

1212
/**
13-
* Generate CSS.
13+
* Generates CSS.
1414
*
1515
* @since Twenty Twenty 1.0
1616
*
@@ -48,8 +48,8 @@ function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $su
4848
if ( ! function_exists( 'twentytwenty_get_customizer_css' ) ) {
4949

5050
/**
51-
* Get CSS Built from Customizer Options.
52-
* Build CSS reflecting colors, fonts and other options set in the Customizer, and return them for output.
51+
* Gets CSS Built from Customizer Options.
52+
* Builds CSS reflecting colors, fonts and other options set in the Customizer, and returns them for output.
5353
*
5454
* @since Twenty Twenty 1.0
5555
*

src/wp-content/themes/twentytwenty/inc/starter-content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
/**
13-
* Function to return the array of starter content for the theme.
13+
* Returns the array of starter content for the theme.
1414
*
1515
* Passes it through the `twentytwenty_starter_content` filter before returning.
1616
*

src/wp-content/themes/twentytwenty/inc/svg-icons.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
if ( ! function_exists( 'twentytwenty_the_theme_svg' ) ) {
1111
/**
12-
* Output and Get Theme SVG.
13-
* Output and get the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
12+
* Outputs the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
1413
*
1514
* @since Twenty Twenty 1.0
1615
*
@@ -26,7 +25,7 @@ function twentytwenty_the_theme_svg( $svg_name, $group = 'ui', $color = '' ) {
2625
if ( ! function_exists( 'twentytwenty_get_theme_svg' ) ) {
2726

2827
/**
29-
* Get information about the SVG icon.
28+
* Gets information about the SVG icon.
3029
*
3130
* @since Twenty Twenty 1.0
3231
*

0 commit comments

Comments
 (0)