From 254251d7c618e20183697392455d4b2b3a61296b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 25 Sep 2024 18:08:17 +0000 Subject: [PATCH] Twenty Nineteen: Add missing documentation for helper function parameters. Follow-up to [43808], [44149], [47214], [47242]. Props pitamdey. Fixes #62112. Built from https://develop.svn.wordpress.org/trunk@59090 git-svn-id: http://core.svn.wordpress.org/trunk@58486 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../classes/class-twentynineteen-svg-icons.php | 7 +++++++ wp-content/themes/twentynineteen/header.php | 1 + .../themes/twentynineteen/inc/helper-functions.php | 10 +++++++++- wp-includes/version.php | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php b/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php index 9361305d42..eaca9fb414 100644 --- a/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php +++ b/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php @@ -23,6 +23,10 @@ class TwentyNineteen_SVG_Icons { /** * Gets the SVG code for a given icon. + * + * @param string $group The group of icons ('ui' or 'social'). + * @param string $icon The specific icon to retrieve. + * @param int $size The desired width and height for the SVG icon. */ public static function get_svg( $group, $icon, $size ) { if ( 'ui' === $group ) { @@ -44,6 +48,9 @@ class TwentyNineteen_SVG_Icons { /** * Detects the social network from a URL and returns the SVG code for its icon. + * + * @param string $uri The URL of the social network link. + * @param int $size The desired width and height for the SVG icon. */ public static function get_social_link_svg( $uri, $size ) { static $regex_map; // Only compute regex map once, for performance. diff --git a/wp-content/themes/twentynineteen/header.php b/wp-content/themes/twentynineteen/header.php index 119417460c..4833558927 100644 --- a/wp-content/themes/twentynineteen/header.php +++ b/wp-content/themes/twentynineteen/header.php @@ -10,6 +10,7 @@ * @subpackage Twenty_Nineteen * @since Twenty Nineteen 1.0 */ + ?> > diff --git a/wp-content/themes/twentynineteen/inc/helper-functions.php b/wp-content/themes/twentynineteen/inc/helper-functions.php index c18275604a..51c93835f8 100644 --- a/wp-content/themes/twentynineteen/inc/helper-functions.php +++ b/wp-content/themes/twentynineteen/inc/helper-functions.php @@ -32,6 +32,9 @@ function twentynineteen_get_avatar_size() { * Returns true if comment is by author of the post. * * @see get_comment_class() + * + * @param WP_Comment|null $comment The comment object to check. Defaults to the current comment. + * @return bool True if the comment is by the author of the post, false otherwise. */ function twentynineteen_is_comment_by_post_author( $comment = null ) { if ( is_object( $comment ) && $comment->user_id > 0 ) { @@ -82,7 +85,12 @@ function twentynineteen_get_discussion_data() { } /** - * Converts HSL to HEX colors. + * Converts HSL to HEX or RGB colors. + * + * @param float $h The hue component (0-360). + * @param float $s The saturation component (0-100). + * @param float $l The lightness component (0-100). + * @param bool $to_hex Whether to convert to HEX format (true) or RGB (false). Default true. */ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index ff3c05b58d..039f6d30bb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59089'; +$wp_version = '6.7-alpha-59090'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.