Make WordPress Core


Ignore:
Timestamp:
07/02/2021 08:56:06 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty-One: Add missing documentation for some filters.

Add missing @since tags for some functions.

Follow-up to [49216], [49220], [49854], [51294].

See #52628, #53461.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php

    r51294 r51304  
    104104 */
    105105function twenty_twenty_one_can_show_post_thumbnail() {
     106        /**
     107         * Filters whether post thumbnail can be displayed.
     108         *
     109         * @since Twenty Twenty-One 1.0
     110         *
     111         * @param bool $show_post_thumbnail Whether to show post thumbnail.
     112         */
    106113        return apply_filters(
    107114                'twenty_twenty_one_can_show_post_thumbnail',
     
    122129
    123130/**
    124  * Creates continue reading text
     131 * Creates continue reading text.
     132 *
     133 * @since Twenty Twenty-One 1.0
    125134 */
    126135function twenty_twenty_one_continue_reading_text() {
     
    135144
    136145/**
    137  * Create the continue reading link for excerpt.
     146 * Creates the continue reading link for excerpt.
     147 *
     148 * @since Twenty Twenty-One 1.0
    138149 */
    139150function twenty_twenty_one_continue_reading_link_excerpt() {
     
    147158
    148159/**
    149  * Create the continue reading link.
     160 * Creates the continue reading link.
     161 *
     162 * @since Twenty Twenty-One 1.0
    150163 */
    151164function twenty_twenty_one_continue_reading_link() {
     
    160173if ( ! function_exists( 'twenty_twenty_one_post_title' ) ) {
    161174        /**
    162          * Add a title to posts and pages that are missing titles.
     175         * Adds a title to posts and pages that are missing titles.
    163176         *
    164177         * @since Twenty Twenty-One 1.0
     
    190203 * Changes the default navigation arrows to svg icons
    191204 *
     205 * @since Twenty Twenty-One 1.0
     206 *
    192207 * @param string $calendar_output The generated HTML of the calendar.
    193208 * @return string
     
    205220 * Return CSS for non-latin language, if available, or null
    206221 *
    207  * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
     222 * @since Twenty Twenty-One 1.0
     223 *
     224 * @param string $type Whether to return CSS for the "front-end", "block-editor", or "classic-editor".
    208225 * @return string
    209226 */
     
    213230        $locale = get_bloginfo( 'language' );
    214231
    215         // Define fallback fonts for non-latin languages.
     232        /**
     233         * Filters the fallback fonts for non-latin languages.
     234         *
     235         * @since Twenty Twenty-One 1.0
     236         *
     237         * @param array $font_family An array of locales and font families.
     238         */
    216239        $font_family = apply_filters(
    217240                'twenty_twenty_one_get_localized_font_family_types',
     
    283306        }
    284307
    285         // Define elements to apply fallback fonts to.
     308        /**
     309         * Filters the elements to apply fallback fonts to.
     310         *
     311         * @since Twenty Twenty-One 1.0
     312         *
     313         * @param array $elements An array of elements for "front-end", "block-editor", or "classic-editor".
     314         */
    286315        $elements = apply_filters(
    287316                'twenty_twenty_one_get_localized_font_family_elements',
     
    369398
    370399        if ( $blocks_content ) {
     400                /** This filter is documented in wp-includes/post-template.php */
    371401                echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput
    372402                return true;
Note: See TracChangeset for help on using the changeset viewer.