Opened 3 months ago
Last modified 3 months ago
#53615 new defect (bug)
wrong typehint for second argument($default) of get_theme_mod
Reported by: | mskapusuz | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 5.7.2 |
Component: | Themes | Keywords: | |
Focuses: | docs, coding-standards | Cc: |
Description
Hey!
get_theme_mod($name, $default)
accepts two parameter, the second parameter is $default.
type of the $default has defined as string|false but we can use it as array like the $default args of the get_option() function.
I think, the phpdoc should be mixed instead of string|false on here: https://prnt.sc/198s94m
also on source code: https://github.com/WordPress/WordPress/blob/ccdb1766aead26d4cef79badb015bb2727fefd59/wp-includes/theme.php#L1000
thanks!
Note: See
TracTickets for help on using
tickets.