Skip to content

Commit 3479f1f

Browse files
Twenty Seventeen: 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@60533 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 96b9e7a commit 3479f1f

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function twentyseventeen_setup() {
244244
add_action( 'after_setup_theme', 'twentyseventeen_setup' );
245245

246246
/**
247-
* Set the content width in pixels, based on the theme's design and stylesheet.
247+
* Sets the content width in pixels, based on the theme's design and stylesheet.
248248
*
249249
* Priority 0 to make it available to lower priority callbacks.
250250
*
@@ -284,7 +284,7 @@ function twentyseventeen_content_width() {
284284

285285
if ( ! function_exists( 'twentyseventeen_fonts_url' ) ) :
286286
/**
287-
* Register custom fonts.
287+
* Registers custom fonts.
288288
*
289289
* @since Twenty Seventeen 1.0
290290
* @since Twenty Seventeen 3.2 Replaced Google URL with self-hosted fonts.
@@ -309,7 +309,7 @@ function twentyseventeen_fonts_url() {
309309
endif;
310310

311311
/**
312-
* Add preconnect for Google Fonts.
312+
* Adds preconnect for Google Fonts.
313313
*
314314
* @since Twenty Seventeen 1.0
315315
* @deprecated Twenty Seventeen 3.2 Disabled filter because, by default, fonts are self-hosted.
@@ -331,7 +331,7 @@ function twentyseventeen_resource_hints( $urls, $relation_type ) {
331331
// add_filter( 'wp_resource_hints', 'twentyseventeen_resource_hints', 10, 2 );
332332

333333
/**
334-
* Register widget area.
334+
* Registers widget area.
335335
*
336336
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
337337
*/
@@ -411,7 +411,7 @@ function twentyseventeen_javascript_detection() {
411411
add_action( 'wp_head', 'twentyseventeen_javascript_detection', 0 );
412412

413413
/**
414-
* Add a pingback url auto-discovery header for singularly identifiable articles.
414+
* Adds a pingback url auto-discovery header for singularly identifiable articles.
415415
*/
416416
function twentyseventeen_pingback_header() {
417417
if ( is_singular() && pings_open() ) {
@@ -421,7 +421,7 @@ function twentyseventeen_pingback_header() {
421421
add_action( 'wp_head', 'twentyseventeen_pingback_header' );
422422

423423
/**
424-
* Display custom color CSS.
424+
* Displays custom color CSS.
425425
*/
426426
function twentyseventeen_colors_css_wrap() {
427427
if ( 'custom' !== get_theme_mod( 'colorscheme' ) && ! is_customize_preview() ) {
@@ -551,7 +551,7 @@ function twentyseventeen_block_editor_styles() {
551551
add_action( 'enqueue_block_editor_assets', 'twentyseventeen_block_editor_styles' );
552552

553553
/**
554-
* Add custom image sizes attribute to enhance responsive image functionality
554+
* Adds custom image sizes attribute to enhance responsive image functionality
555555
* for content images.
556556
*
557557
* @since Twenty Seventeen 1.0
@@ -598,7 +598,7 @@ function twentyseventeen_header_image_tag( $html, $header, $attr ) {
598598
add_filter( 'get_header_image_tag', 'twentyseventeen_header_image_tag', 10, 3 );
599599

600600
/**
601-
* Add custom image sizes attribute to enhance responsive image functionality
601+
* Adds custom image sizes attribute to enhance responsive image functionality
602602
* for post thumbnails.
603603
*
604604
* @since Twenty Seventeen 1.0
@@ -622,7 +622,7 @@ function twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size )
622622
add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );
623623

624624
/**
625-
* Use front-page.php when Front page displays is set to a static page.
625+
* Uses front-page.php when Front page displays is set to a static page.
626626
*
627627
* @since Twenty Seventeen 1.0
628628
*
@@ -692,10 +692,10 @@ function wp_get_list_item_separator() {
692692
endif;
693693

694694
/**
695-
* Show the featured image below the header on single posts and pages, unless the
696-
* page is the front page.
695+
* Shows the featured image below the header on single posts and pages, unless
696+
* the page is the front page.
697697
*
698-
* Use the filter `twentyseventeen_should_show_featured_image` in a child theme or
698+
* Uses the filter `twentyseventeen_should_show_featured_image` in a child theme or
699699
* plugin to change when the image is shown. This example prevents the image
700700
* from showing:
701701
*
@@ -749,7 +749,7 @@ function twentyseventeen_should_show_featured_image() {
749749
require get_parent_theme_file_path( '/inc/icon-functions.php' );
750750

751751
/**
752-
* Register block patterns and pattern categories.
752+
* Registers block patterns and pattern categories.
753753
*
754754
* @since Twenty Seventeen 3.8
755755
*/

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

src/wp-content/themes/twentyseventeen/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 custom color scheme.
11+
* Generates the CSS for the current custom color scheme.
1212
*/
1313
function twentyseventeen_custom_colors_css() {
1414
$hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) );

src/wp-content/themes/twentyseventeen/inc/custom-header.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
/**
13-
* Set up the WordPress core custom header feature.
13+
* Sets up the WordPress core custom header feature.
1414
*
1515
* @uses twentyseventeen_header_style()
1616
*/
@@ -118,7 +118,7 @@ function twentyseventeen_header_style() {
118118
endif; // End of twentyseventeen_header_style().
119119

120120
/**
121-
* Customize video play/pause button in the custom header.
121+
* Customizes video play/pause button in the custom header.
122122
*
123123
* @param array $settings Video settings.
124124
* @return array The filtered video settings.

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

Lines changed: 9 additions & 9 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
*/
@@ -162,7 +162,7 @@ function twentyseventeen_customize_register( $wp_customize ) {
162162
add_action( 'customize_register', 'twentyseventeen_customize_register' );
163163

164164
/**
165-
* Sanitize the page layout options.
165+
* Sanitizes the page layout options.
166166
*
167167
* @param string $input Page layout.
168168
*/
@@ -180,7 +180,7 @@ function twentyseventeen_sanitize_page_layout( $input ) {
180180
}
181181

182182
/**
183-
* Sanitize the colorscheme.
183+
* Sanitizes the colorscheme.
184184
*
185185
* @param string $input Color scheme.
186186
*/
@@ -195,7 +195,7 @@ function twentyseventeen_sanitize_colorscheme( $input ) {
195195
}
196196

197197
/**
198-
* Render the site title for the selective refresh partial.
198+
* Renders the site title for the selective refresh partial.
199199
*
200200
* @since Twenty Seventeen 1.0
201201
*
@@ -208,7 +208,7 @@ function twentyseventeen_customize_partial_blogname() {
208208
}
209209

210210
/**
211-
* Render the site tagline for the selective refresh partial.
211+
* Renders the site tagline for the selective refresh partial.
212212
*
213213
* @since Twenty Seventeen 1.0
214214
*
@@ -221,7 +221,7 @@ function twentyseventeen_customize_partial_blogdescription() {
221221
}
222222

223223
/**
224-
* Return whether we're previewing the front page and it's a static page.
224+
* Returns whether we're previewing the front page and it's a static page.
225225
*
226226
* This function is an alias for twentyseventeen_is_frontpage().
227227
*
@@ -235,23 +235,23 @@ function twentyseventeen_is_static_front_page() {
235235
}
236236

237237
/**
238-
* Return whether we're on a view that supports a one or two column layout.
238+
* Returns whether we're on a view that supports a one or two column layout.
239239
*/
240240
function twentyseventeen_is_view_with_layout_option() {
241241
// This option is available on all pages. It's also available on archives when there isn't a sidebar.
242242
return ( is_page() || ( is_archive() && ! is_active_sidebar( 'sidebar-1' ) ) );
243243
}
244244

245245
/**
246-
* Bind JS handlers to instantly live-preview changes.
246+
* Binds JS handlers to instantly live-preview changes.
247247
*/
248248
function twentyseventeen_customize_preview_js() {
249249
wp_enqueue_script( 'twentyseventeen-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), array( 'customize-preview' ), '20161002', array( 'in_footer' => true ) );
250250
}
251251
add_action( 'customize_preview_init', 'twentyseventeen_customize_preview_js' );
252252

253253
/**
254-
* Load dynamic logic for the customizer controls area.
254+
* Loads dynamic logic for the customizer controls area.
255255
*/
256256
function twentyseventeen_panels_js() {
257257
wp_enqueue_script( 'twentyseventeen-customize-controls', get_theme_file_uri( '/assets/js/customize-controls.js' ), array(), '20161020', array( 'in_footer' => true ) );

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

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

1010
/**
11-
* Add SVG definitions to the footer.
11+
* Adds SVG definitions to the footer.
1212
*/
1313
function twentyseventeen_include_svg_icons() {
1414
// Define SVG sprite file.
@@ -22,7 +22,7 @@ function twentyseventeen_include_svg_icons() {
2222
add_action( 'wp_footer', 'twentyseventeen_include_svg_icons', 9999 );
2323

2424
/**
25-
* Return SVG markup.
25+
* Returns SVG markup.
2626
*
2727
* @param array $args {
2828
* Parameters needed to display an SVG.
@@ -115,7 +115,7 @@ function twentyseventeen_get_svg( $args = array() ) {
115115
}
116116

117117
/**
118-
* Display SVG icons in social links menu.
118+
* Displays SVG icons in social links menu.
119119
*
120120
* @param string $item_output The menu item's starting HTML output.
121121
* @param WP_Post $item Menu item data object.
@@ -141,7 +141,7 @@ function twentyseventeen_nav_menu_social_icons( $item_output, $item, $depth, $ar
141141
add_filter( 'walker_nav_menu_start_el', 'twentyseventeen_nav_menu_social_icons', 10, 4 );
142142

143143
/**
144-
* Add dropdown icon if menu item has children.
144+
* Adds dropdown icon if menu item has children.
145145
*
146146
* @param string $title The menu item's title.
147147
* @param WP_Post $item The current menu item.

0 commit comments

Comments
 (0)