Make WordPress Core

Changeset 61302


Ignore:
Timestamp:
11/25/2025 05:00:39 AM (3 weeks ago)
Author:
westonruter
Message:

Bundled Themes: Add missing @return tags and descriptions.

Developed in https://github.com/WordPress/wordpress-develop/pull/10533

Props huzaifaalmesbah, sabernhardt, palak678, westonruter.
See #64224.
Fixes #64277.

Location:
trunk/src/wp-content/themes
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/functions.php

    r61096 r61302  
    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() {
  • trunk/src/wp-content/themes/twentyfifteen/functions.php

    r61109 r61302  
    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() {
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r61109 r61302  
    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() {
     
    756756 *
    757757 * @global WP_Customize_Manager $wp_customize Customizer object.
     758 *
     759 * @return bool Whether the site is being previewed in the Customizer.
    758760 */
    759761if ( ! function_exists( 'is_customize_preview' ) ) :
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r60519 r61302  
    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() {
  • trunk/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php

    r59090 r61302  
    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 ) {
     
    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 ) {
  • trunk/src/wp-content/themes/twentynineteen/functions.php

    r61064 r61302  
    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() {
  • trunk/src/wp-content/themes/twentynineteen/inc/customizer.php

    r60535 r61302  
    143143 *
    144144 * @param string $choice Whether image filter is active.
    145  * @return string
     145 * @return string Sanitized color option.
    146146 */
    147147function twentynineteen_sanitize_color_option( $choice ) {
  • trunk/src/wp-content/themes/twentynineteen/inc/template-functions.php

    r59921 r61302  
    1212 *
    1313 * @param array $classes Classes for the body element.
    14  * @return array
     14 * @return string[] The filtered body class list.
    1515 */
    1616function twentynineteen_body_classes( $classes ) {
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r60966 r61302  
    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() {
     
    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() {
  • trunk/src/wp-content/themes/twentyseventeen/inc/template-functions.php

    r56549 r61302  
    1212 *
    1313 * @param array $classes Classes for the body element.
    14  * @return array
     14 * @return string[] Filtered body classes with theme-specific additions.
    1515 */
    1616function twentyseventeen_body_classes( $classes ) {
  • trunk/src/wp-content/themes/twentyseventeen/inc/template-tags.php

    r58687 r61302  
    185185 * Returns true if a blog has more than 1 category.
    186186 *
    187  * @return bool
     187 * @return bool Whether the blog has more than 1 category.
    188188 */
    189189function twentyseventeen_categorized_blog() {
  • trunk/src/wp-content/themes/twentysixteen/functions.php

    r61109 r61302  
    335335     * @since Twenty Sixteen 2.9 Replaced Google URL with self-hosted fonts.
    336336     *
    337      * @return string Fonts URL for the theme.
     337     * @return string Font stylesheet URL or empty string if disabled.
    338338     */
    339339    function twentysixteen_fonts_url() {
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r61109 r61302  
    271271     * @since Twenty Thirteen 3.8 Replaced Google URL with self-hosted fonts.
    272272     *
    273      * @return string Font stylesheet or empty string if disabled.
     273     * @return string Font stylesheet URL or empty string if disabled.
    274274     */
    275275    function twentythirteen_fonts_url() {
     
    474474     * Added for backward compatibility to support pre-6.0.0 WordPress versions.
    475475     *
    476      * @since 6.0.0
     476     * @since Twenty Thirteen 3.7
     477     *
     478     * @return string Locale-specific list item separator.
    477479     */
    478480    function wp_get_list_item_separator() {
  • trunk/src/wp-content/themes/twentytwelve/functions.php

    r61095 r61302  
    161161     * @since Twenty Twelve 3.9 Replaced Google URL with self-hosted font.
    162162     *
    163      * @return string Font stylesheet or empty string if disabled.
     163     * @return string Font stylesheet URL or empty string if disabled.
    164164     */
    165165    function twentytwelve_get_font_url() {
     
    397397     * Added for backward compatibility to support pre-6.0.0 WordPress versions.
    398398     *
    399      * @since 6.0.0
     399     * @since Twenty Twelve 3.7
     400     *
     401     * @return string Locale-specific list item separator.
    400402     */
    401403    function wp_get_list_item_separator() {
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

    r60536 r61302  
    460460         *
    461461         * @param bool $checked Whether or not a box is checked.
    462          * @return bool
     462         * @return bool Whether the checkbox is checked.
    463463         */
    464464        public static function sanitize_checkbox( $checked ) {
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r60681 r61302  
    305305 *
    306306 * @param string $html The HTML output from get_custom_logo() (core function).
    307  * @return string
     307 * @return string Custom logo HTML with "retina" resolution applied if enabled.
    308308 */
    309309function twentytwenty_get_custom_logo( $html ) {
     
    636636 *
    637637 * @param string $html The default output HTML for the more tag.
    638  * @return string
     638 * @return string The the read more link wrapped in a `div`.
    639639 */
    640640function twentytwenty_read_more_tag( $html ) {
     
    737737 * @since Twenty Twenty 1.0
    738738 *
    739  * @return array
     739 * @return array Customizer color variables for the preview.
    740740 */
    741741function twentytwenty_get_customizer_color_vars() {
     
    756756 * @since Twenty Twenty 1.0
    757757 *
    758  * @return array
     758 * @return array Elements to apply custom colors to.
    759759 */
    760760function twentytwenty_get_elements_array() {
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r60536 r61302  
    2121     * @param string $suffix   The CSS suffix.
    2222     * @param bool   $display  Print the styles.
     23     * @return string Generated CSS.
    2324     */
    2425    function twentytwenty_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $display = true ) {
     
    5556     *
    5657     * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor".
     58     * @return string CSS styles built from Customizer options.
    5759     */
    5860    function twentytwenty_get_customizer_css( $type = 'front-end' ) {
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r60913 r61302  
    149149 *
    150150 * @param object $comment Comment data.
    151  * @return bool
     151 * @return bool Whether the comment is by the post author.
    152152 */
    153153function twentytwenty_is_comment_by_post_author( $comment = null ) {
     
    250250 * @param int    $post_id  The ID of the post.
    251251 * @param string $location The location where the meta is shown.
     252 * @return string Post meta HTML.
    252253 */
    253254function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' ) {
  • trunk/src/wp-content/themes/twentytwentyone/functions.php

    r61070 r61302  
    656656     * Added for backward compatibility to support pre-6.0.0 WordPress versions.
    657657     *
    658      * @since 6.0.0
     658     * @since Twenty Twenty-One 1.6
     659     *
     660     * @return string Locale-specific list item separator.
    659661     */
    660662    function wp_get_list_item_separator() {
  • trunk/src/wp-content/themes/twentytwentyone/inc/custom-css.php

    r60537 r61302  
    1919 * @param string $suffix   The CSS suffix.
    2020 * @param bool   $display  Print the styles.
    21  * @return string
     21 * @return string Generated CSS.
    2222 */
    2323function twenty_twenty_one_generate_css( $selector, $style, $value, $prefix = '', $suffix = '', $display = true ) {
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php

    r60913 r61302  
    1414 *
    1515 * @param array $classes Classes for the body element.
    16  * @return array
     16 * @return string[] Body classes with theme-specific additions.
    1717 */
    1818function twenty_twenty_one_body_classes( $classes ) {
     
    4444 *
    4545 * @param array $classes An array of CSS classes.
    46  * @return array
     46 * @return string[] Post classes with 'entry' class added.
    4747 */
    4848function twenty_twenty_one_post_classes( $classes ) {
     
    9292 *
    9393 * @param array $defaults The form defaults.
    94  * @return array
     94 * @return array Comment form defaults with adjusted textarea height.
    9595 */
    9696function twenty_twenty_one_comment_form_defaults( $defaults ) {
     
    201201 * @param string $icon  The icon.
    202202 * @param int    $size  The icon size in pixels.
    203  * @return string
     203 * @return string SVG code for the requested icon.
    204204 */
    205205function twenty_twenty_one_get_icon_svg( $group, $icon, $size = 24 ) {
     
    213213 *
    214214 * @param string $calendar_output The generated HTML of the calendar.
    215  * @return string
     215 * @return string Calendar HTML with SVG navigation arrows.
    216216 */
    217217function twenty_twenty_one_change_calendar_nav_arrows( $calendar_output ) {
     
    230230 *
    231231 * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor".
    232  * @return string
     232 * @return string CSS styles for non-Latin languages based on the site locale.
    233233 */
    234234function twenty_twenty_one_get_non_latin_css( $type = 'front-end' ) {
Note: See TracChangeset for help on using the changeset viewer.