Skip to content

Commit f2748b9

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

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function wp_get_list_item_separator() {
190190
endif;
191191

192192
/**
193-
* Register widget area.
193+
* Registers widget area.
194194
*
195195
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
196196
*/
@@ -235,7 +235,7 @@ function twentynineteen_excerpt_more( $link ) {
235235
add_filter( 'excerpt_more', 'twentynineteen_excerpt_more' );
236236

237237
/**
238-
* Set the content width in pixels, based on the theme's design and stylesheet.
238+
* Sets the content width in pixels, based on the theme's design and stylesheet.
239239
*
240240
* Priority 0 to make it available to lower priority callbacks.
241241
*
@@ -291,7 +291,7 @@ function twentynineteen_scripts() {
291291
add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' );
292292

293293
/**
294-
* Fix skip link focus in IE11.
294+
* Fixes skip link focus in IE11.
295295
*
296296
* This does not enqueue the script because it is tiny and because it is only for IE11,
297297
* thus it does not warrant having an entire dedicated blocking script being loaded.
@@ -311,7 +311,7 @@ function twentynineteen_skip_link_focus_fix() {
311311
}
312312

313313
/**
314-
* Enqueue supplemental block editor styles.
314+
* Enqueues supplemental block editor styles.
315315
*/
316316
function twentynineteen_editor_customizer_styles() {
317317

@@ -326,7 +326,7 @@ function twentynineteen_editor_customizer_styles() {
326326
add_action( 'enqueue_block_editor_assets', 'twentynineteen_editor_customizer_styles' );
327327

328328
/**
329-
* Display custom color CSS in customizer and on frontend.
329+
* Displays custom color CSS in customizer and on frontend.
330330
*/
331331
function twentynineteen_colors_css_wrap() {
332332

@@ -386,7 +386,7 @@ function twentynineteen_colors_css_wrap() {
386386
require get_template_directory() . '/inc/customizer.php';
387387

388388
/**
389-
* Register block patterns and pattern categories.
389+
* Registers block patterns and pattern categories.
390390
*
391391
* @since Twenty Nineteen 3.0
392392
*/

src/wp-content/themes/twentynineteen/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-
* Prevent switching to Twenty Nineteen on old versions of WordPress.
15+
* Prevents switching to Twenty Nineteen on old versions of WordPress.
1616
*
1717
* Switches to the default theme.
1818
*

src/wp-content/themes/twentynineteen/inc/color-patterns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
/**
11-
* Generate the CSS for the current primary color.
11+
* Generates the CSS for the current primary color.
1212
*/
1313
function twentynineteen_custom_colors_css() {
1414

src/wp-content/themes/twentynineteen/inc/customizer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
/**
11-
* Add postMessage support for site title and description for the Theme Customizer.
11+
* Adds postMessage support for site title and description for the Theme Customizer.
1212
*
1313
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
1414
*/
@@ -105,7 +105,7 @@ function twentynineteen_customize_register( $wp_customize ) {
105105
add_action( 'customize_register', 'twentynineteen_customize_register' );
106106

107107
/**
108-
* Render the site title for the selective refresh partial.
108+
* Renders the site title for the selective refresh partial.
109109
*
110110
* @return void
111111
*/
@@ -114,7 +114,7 @@ function twentynineteen_customize_partial_blogname() {
114114
}
115115

116116
/**
117-
* Render the site tagline for the selective refresh partial.
117+
* Renders the site tagline for the selective refresh partial.
118118
*
119119
* @return void
120120
*/
@@ -123,23 +123,23 @@ function twentynineteen_customize_partial_blogdescription() {
123123
}
124124

125125
/**
126-
* Bind JS handlers to instantly live-preview changes.
126+
* Binds JS handlers to instantly live-preview changes.
127127
*/
128128
function twentynineteen_customize_preview_js() {
129129
wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', array( 'in_footer' => true ) );
130130
}
131131
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );
132132

133133
/**
134-
* Load dynamic logic for the customizer controls area.
134+
* Loads dynamic logic for the customizer controls area.
135135
*/
136136
function twentynineteen_panels_js() {
137137
wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181214', array( 'in_footer' => true ) );
138138
}
139139
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );
140140

141141
/**
142-
* Sanitize custom color choice.
142+
* Sanitizes custom color choice.
143143
*
144144
* @param string $choice Whether image filter is active.
145145
* @return string

src/wp-content/themes/twentynineteen/inc/icon-functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function twentynineteen_get_social_link_svg( $uri, $size = 24 ) {
3838
}
3939

4040
/**
41-
* Display SVG icons in social links menu.
41+
* Displays SVG icons in social links menu.
4242
*
4343
* @param string $item_output The menu item's starting HTML output.
4444
* @param WP_Post $item Menu item data object.
@@ -61,7 +61,7 @@ function twentynineteen_nav_menu_social_icons( $item_output, $item, $depth, $arg
6161
add_filter( 'walker_nav_menu_start_el', 'twentynineteen_nav_menu_social_icons', 10, 4 );
6262

6363
/**
64-
* Add a dropdown icon to top-level menu items.
64+
* Adds a dropdown icon to top-level menu items.
6565
*
6666
* @param string $item_output The menu item's starting HTML output.
6767
* @param WP_Post $item Menu item data object.

src/wp-content/themes/twentynineteen/inc/template-tags.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function twentynineteen_discussion_avatars_list( $comment_authors ) {
202202

203203
if ( ! function_exists( 'twentynineteen_comment_form' ) ) :
204204
/**
205-
* Documentation for function.
205+
* Displays the comment form.
206206
*/
207207
function twentynineteen_comment_form( $order ) {
208208
if ( true === $order || strtolower( $order ) === strtolower( get_option( 'comment_order', 'asc' ) ) ) {
@@ -218,7 +218,7 @@ function twentynineteen_comment_form( $order ) {
218218

219219
if ( ! function_exists( 'twentynineteen_the_posts_navigation' ) ) :
220220
/**
221-
* Documentation for function.
221+
* Displays the next and previous posts navigation.
222222
*/
223223
function twentynineteen_the_posts_navigation() {
224224
the_posts_pagination(
@@ -241,7 +241,7 @@ function twentynineteen_the_posts_navigation() {
241241

242242
if ( ! function_exists( 'wp_body_open' ) ) :
243243
/**
244-
* Fire the wp_body_open action.
244+
* Fires the wp_body_open action.
245245
*
246246
* Added for backward compatibility to support pre-5.2.0 WordPress versions.
247247
*

src/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
}
4444

4545
/**
46-
* Add class.
46+
* Adds class to an element.
4747
*
4848
* @param {Object} el
4949
* @param {string} cls
@@ -55,7 +55,7 @@
5555
}
5656

5757
/**
58-
* Delete class.
58+
* Deletes class from an element.
5959
*
6060
* @param {Object} el
6161
* @param {string} cls
@@ -65,7 +65,7 @@
6565
}
6666

6767
/**
68-
* Has class?
68+
* Determines whether an element has the given class.
6969
*
7070
* @param {Object} el
7171
* @param {string} cls
@@ -80,7 +80,7 @@
8080
}
8181

8282
/**
83-
* Toggle Aria Expanded state for screenreaders.
83+
* Toggles Aria Expanded state for screenreaders.
8484
*
8585
* @param {Object} ariaItem
8686
*/
@@ -99,7 +99,7 @@
9999
}
100100

101101
/**
102-
* Open sub-menu.
102+
* Opens sub-menu.
103103
*
104104
* @param {Object} currentSubMenu
105105
*/
@@ -116,7 +116,7 @@
116116
}
117117

118118
/**
119-
* Close sub-menu.
119+
* Closes sub-menu.
120120
*
121121
* @param {Object} currentSubMenu
122122
*/
@@ -152,7 +152,7 @@
152152
}
153153

154154
/**
155-
* Find first ancestor of an element by selector.
155+
* Finds first ancestor of an element by selector.
156156
*
157157
* @param {Object} child
158158
* @param {String} selector
@@ -181,7 +181,7 @@
181181
}
182182

183183
/**
184-
* Remove all off-canvas states.
184+
* Removes all off-canvas states.
185185
*/
186186
function removeAllFocusStates() {
187187
'use strict';
@@ -209,7 +209,7 @@
209209
}
210210

211211
/**
212-
* Toggle `focus` class to allow sub-menu access on touch screens.
212+
* Toggles `focus` class to allow sub-menu access on touch screens.
213213
*/
214214
function toggleSubmenuDisplay() {
215215

0 commit comments

Comments
 (0)