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
This commit is contained in:
Sergey Biryukov 2024-09-25 18:08:17 +00:00
parent 7f7d48df61
commit 254251d7c6
4 changed files with 18 additions and 2 deletions

View File

@ -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.

View File

@ -10,6 +10,7 @@
* @subpackage Twenty_Nineteen
* @since Twenty Nineteen 1.0
*/
?><!doctype html>
<html <?php language_attributes(); ?>>
<head>

View File

@ -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 ) {

View File

@ -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.