Skip to content

Commit 985692b

Browse files
committed
Bundled Themes: Add missing @return tags and descriptions.
Developed in #10533 Props huzaifaalmesbah, sabernhardt, palak678, westonruter. See #64224. Fixes #64277. git-svn-id: https://develop.svn.wordpress.org/trunk@61302 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c11b2aa commit 985692b

File tree

21 files changed

+49
-30
lines changed

21 files changed

+49
-30
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,9 @@ function twentyeleven_skip_link() {
988988
*
989989
* Added for backward compatibility to support pre-6.0.0 WordPress versions.
990990
*
991-
* @since 6.0.0
991+
* @since Twenty Eleven 4.1
992+
*
993+
* @return string Locale-specific list item separator.
992994
*/
993995
function wp_get_list_item_separator() {
994996
/* translators: Used between list items, there is a space after the comma. */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ function twentyfifteen_widgets_init() {
366366
* @since Twenty Fifteen 1.0
367367
* @since Twenty Fifteen 3.4 Replaced Google URL with self-hosted fonts.
368368
*
369-
* @return string Fonts URL for the theme.
369+
* @return string Font stylesheet URL or empty string if disabled.
370370
*/
371371
function twentyfifteen_fonts_url() {
372372
$fonts_url = '';

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ function twentyfourteen_widgets_init() {
315315
* @since Twenty Fourteen 1.0
316316
* @since Twenty Fourteen 3.6 Replaced Google URL with self-hosted fonts.
317317
*
318-
* @return string
318+
* @return string Font stylesheet URL or empty string if disabled.
319319
*/
320320
function twentyfourteen_font_url() {
321321
$font_url = '';
@@ -755,6 +755,8 @@ function twentyfourteen_register_block_patterns() {
755755
* `is_customize_preview` function was introduced.
756756
*
757757
* @global WP_Customize_Manager $wp_customize Customizer object.
758+
*
759+
* @return bool Whether the site is being previewed in the Customizer.
758760
*/
759761
if ( ! function_exists( 'is_customize_preview' ) ) :
760762
function is_customize_preview() {

src/wp-content/themes/twentyfourteen/inc/widgets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
2626
*
2727
* @since Twenty Fourteen 1.0
2828
*
29-
* @return Twenty_Fourteen_Ephemera_Widget
29+
* @return Twenty_Fourteen_Ephemera_Widget Widget instance.
3030
*/
3131
public function __construct() {
3232
parent::__construct(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class TwentyNineteen_SVG_Icons {
2727
* @param string $group The group of icons ('ui' or 'social').
2828
* @param string $icon The specific icon to retrieve.
2929
* @param int $size The desired width and height for the SVG icon.
30+
* @return string|null SVG code for the icon, or null if not found.
3031
*/
3132
public static function get_svg( $group, $icon, $size ) {
3233
if ( 'ui' === $group ) {
@@ -51,6 +52,7 @@ public static function get_svg( $group, $icon, $size ) {
5152
*
5253
* @param string $uri The URL of the social network link.
5354
* @param int $size The desired width and height for the SVG icon.
55+
* @return string|null SVG code for the social link icon, or null if not found.
5456
*/
5557
public static function get_social_link_svg( $uri, $size ) {
5658
static $regex_map; // Only compute regex map once, for performance.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ function twentynineteen_setup() {
181181
*
182182
* Added for backward compatibility to support pre-6.0.0 WordPress versions.
183183
*
184-
* @since 6.0.0
184+
* @since Twenty Nineteen 2.3
185+
*
186+
* @return string Locale-specific list item separator.
185187
*/
186188
function wp_get_list_item_separator() {
187189
/* translators: Used between list items, there is a space after the comma. */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function twentynineteen_panels_js() {
142142
* Sanitizes custom color choice.
143143
*
144144
* @param string $choice Whether image filter is active.
145-
* @return string
145+
* @return string Sanitized color option.
146146
*/
147147
function twentynineteen_sanitize_color_option( $choice ) {
148148
$valid = array(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Adds custom classes to the array of body classes.
1212
*
1313
* @param array $classes Classes for the body element.
14-
* @return array
14+
* @return string[] The filtered body class list.
1515
*/
1616
function twentynineteen_body_classes( $classes ) {
1717

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function twentyseventeen_content_width() {
289289
* @since Twenty Seventeen 1.0
290290
* @since Twenty Seventeen 3.2 Replaced Google URL with self-hosted fonts.
291291
*
292-
* @return string Fonts URL for the theme.
292+
* @return string Font stylesheet URL or empty string if disabled.
293293
*/
294294
function twentyseventeen_fonts_url() {
295295
$fonts_url = '';
@@ -681,7 +681,9 @@ function twentyseventeen_unique_id( $prefix = '' ) {
681681
*
682682
* Added for backward compatibility to support pre-6.0.0 WordPress versions.
683683
*
684-
* @since 6.0.0
684+
* @since Twenty Seventeen 3.0
685+
*
686+
* @return string Locale-specific list item separator.
685687
*/
686688
function wp_get_list_item_separator() {
687689
/* translators: Used between list items, there is a space after the comma. */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Adds custom classes to the array of body classes.
1212
*
1313
* @param array $classes Classes for the body element.
14-
* @return array
14+
* @return string[] Filtered body classes with theme-specific additions.
1515
*/
1616
function twentyseventeen_body_classes( $classes ) {
1717
// Add class of group-blog to blogs with more than 1 published author.

0 commit comments

Comments
 (0)