Make WordPress Core


Ignore:
Timestamp:
06/20/2020 11:16:12 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Remove an empty line between @param and @return tags, per the documentation standards.

See #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r47799 r48102  
    2222 * Logo & Description
    2323 */
     24
    2425/**
    2526 * Displays the site logo, either text or image.
     
    2728 * @param array   $args Arguments for displaying the site logo either as an image or text.
    2829 * @param boolean $echo Echo or return the HTML.
    29  *
    30  * @return string $html Compiled HTML based on our arguments.
     30 * @return string Compiled HTML based on our arguments.
    3131 */
    3232function twentytwenty_site_logo( $args = array(), $echo = true ) {
     
    9090 *
    9191 * @param boolean $echo Echo or return the html.
    92  *
    93  * @return string $html The HTML to display.
     92 * @return string The HTML to display.
    9493 */
    9594function twentytwenty_site_description( $echo = true ) {
     
    125124 * Comments
    126125 */
    127 /**
    128  * Check if the specified comment is written by the author of the post commented on.
     126
     127/**
     128 * Checks if the specified comment is written by the author of the post commented on.
    129129 *
    130130 * @param object $comment Comment data.
    131  *
    132131 * @return bool
    133132 */
     
    150149
    151150/**
    152  * Filter comment reply link to not JS scroll.
     151 * Filters comment reply link to not JS scroll.
     152 *
    153153 * Filter the comment reply link to add a class indicating it should not use JS slow-scroll, as it
    154154 * makes it scroll to the wrong position on the page.
    155155 *
    156156 * @param string $link Link to the top of the page.
    157  *
    158  * @return string $link Link to the top of the page.
     157 * @return string Link to the top of the page.
    159158 */
    160159function twentytwenty_filter_comment_reply_link( $link ) {
     
    170169 * Post Meta
    171170 */
    172 /**
    173  * Get and Output Post Meta.
    174  * If it's a single post, output the post meta values specified in the Customizer settings.
    175  *
    176  * @param int    $post_id The ID of the post for which the post meta should be output.
     171
     172/**
     173 * Retrieves and displays the post meta.
     174 *
     175 * If it's a single post, outputs the post meta values specified in the Customizer settings.
     176 *
     177 * @param int    $post_id  The ID of the post for which the post meta should be output.
    177178 * @param string $location Which post meta location to output – single or preview.
    178179 */
     
    221222
    222223/**
    223  * Get the post meta.
     224 * Retrieves the post meta.
    224225 *
    225226 * @param int    $post_id The ID of the post.
     
    234235
    235236    /**
    236      * Filters post types array
    237      *
    238      * This filter can be used to hide post meta information of post, page or custom post type registerd by child themes or plugins
     237     * Filters post types array.
     238     *
     239     * This filter can be used to hide post meta information of post, page or custom post type
     240     * registered by child themes or plugins.
    239241     *
    240242     * @since Twenty Twenty 1.0
     
    243245     */
    244246    $disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) );
     247
    245248    // Check whether the post type is allowed to output post meta.
    246249    if ( in_array( get_post_type( $post_id ), $disallowed_post_types, true ) ) {
     
    254257    if ( 'single-top' === $location ) {
    255258        /**
    256         * Filters post meta info visibility
    257         *
    258         * Use this filter to hide post meta information like Author, Post date, Comments, Is sticky status
    259         *
    260         * @since Twenty Twenty 1.0
    261         *
    262         * @param array $args {
    263         *  @type string 'author'
    264         *  @type string 'post-date'
    265         *  @type string 'comments'
    266         *  @type string 'sticky'
    267         * }
    268         */
     259         * Filters post meta info visibility.
     260         *
     261         * Use this filter to hide post meta information like Author, Post date, Comments, Is sticky status.
     262         *
     263         * @since Twenty Twenty 1.0
     264         *
     265         * @param array $args {
     266         *  @type string 'author'
     267         *  @type string 'post-date'
     268         *  @type string 'comments'
     269         *  @type string 'sticky'
     270         * }
     271         */
    269272        $post_meta = apply_filters(
    270273            'twentytwenty_post_meta_location_single_top',
     
    282285
    283286        /**
    284         * Filters post tags visibility
    285         *
    286         * Use this filter to hide post tags
    287         *
    288         * @since Twenty Twenty 1.0
    289         *
    290         * @param array $args {
    291         *   @type string 'tags'
    292         * }
    293         */
     287         * Filters post tags visibility.
     288         *
     289         * Use this filter to hide post tags.
     290         *
     291         * @since Twenty Twenty 1.0
     292         *
     293         * @param array $args {
     294         *   @type string 'tags'
     295         * }
     296         */
    294297        $post_meta = apply_filters(
    295298            'twentytwenty_post_meta_location_single_bottom',
     
    490493 * Menus
    491494 */
    492 /**
    493  * Filter Classes of wp_list_pages items to match menu items.
     495
     496/**
     497 * Filters classes of wp_list_pages items to match menu items.
     498 *
    494499 * Filter the class applied to wp_list_pages() items with children to match the menu class, to simplify.
    495500 * styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
     
    500505 * @param array  $args An array of arguments.
    501506 * @param string $current_page Whether or not the item is the current item.
    502  *
    503507 * @return array $css_class CSS Class names.
    504508 */
     
    529533
    530534/**
    531  * Add a Sub Nav Toggle to the Expanded Menu and Mobile Menu.
     535 * Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu.
    532536 *
    533537 * @param stdClass $args An array of arguments.
    534538 * @param string   $item Menu item.
    535539 * @param int      $depth Depth of the current menu item.
    536  *
    537540 * @return stdClass $args An object of wp_nav_menu() arguments.
    538541 */
     
    576579
    577580/**
    578  * Display SVG icons in social links menu.
     581 * Displays SVG icons in social links menu.
    579582 *
    580583 * @param  string  $item_output The menu item output.
     
    602605 * Classes
    603606 */
    604 /**
    605  * Add No-JS Class.
    606  * If we're missing JavaScript support, the HTML element will have a no-js class.
     607
     608/**
     609 * Adds 'no-js' class.
     610 *
     611 * If we're missing JavaScript support, the HTML element will have a 'no-js' class.
    607612 */
    608613function twentytwenty_no_js_class() {
     
    617622
    618623/**
    619  * Add conditional body classes.
     624 * Adds conditional body classes.
    620625 *
    621626 * @param array $classes Classes added to the body tag.
    622  *
    623  * @return array $classes Classes added to the body tag.
     627 * @return array Classes added to the body tag.
    624628 */
    625629function twentytwenty_body_classes( $classes ) {
     
    717721 * Archives
    718722 */
     723
    719724/**
    720725 * Filters the archive title and styles the word before the first colon.
    721726 *
    722727 * @param string $title Current archive title.
    723  *
    724  * @return string $title Current archive title.
     728 * @return string Current archive title.
    725729 */
    726730function twentytwenty_get_the_archive_title( $title ) {
     
    749753 * Miscellaneous
    750754 */
    751 /**
    752  * Toggle animation duration in milliseconds.
    753  *
    754  * @return integer Duration in milliseconds
     755
     756/**
     757 * Toggles animation duration in milliseconds.
     758 *
     759 * @return int Duration in milliseconds
    755760 */
    756761function twentytwenty_toggle_duration() {
     
    760765     * @since Twenty Twenty 1.0
    761766     *
    762      * @param integer $duration Duration in milliseconds.
     767     * @param int $duration Duration in milliseconds.
    763768     */
    764769    $duration = apply_filters( 'twentytwenty_toggle_duration', 250 );
     
    768773
    769774/**
    770  * Get unique ID.
     775 * Gets unique ID.
    771776 *
    772777 * This is a PHP implementation of Underscore's uniqueId method. A static variable
Note: See TracChangeset for help on using the changeset viewer.