Make WordPress Core


Ignore:
Timestamp:
07/03/2021 09:13:48 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Add missing documentation for some filters.

Add missing @since tags for some functions.

Correct alignment of some @param tags.

Follow-up to [46271], [46278], [51304].

See #52628, #53461.

File:
1 edited

Legend:

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

    r49347 r51322  
    3131 * runs before the init hook. The init hook is too late for some features, such
    3232 * as indicating support for post thumbnails.
     33 *
     34 * @since Twenty Twenty 1.0
    3335 */
    3436function twentytwenty_theme_support() {
     
    184186/**
    185187 * Register and Enqueue Styles.
     188 *
     189 * @since Twenty Twenty 1.0
    186190 */
    187191function twentytwenty_register_styles() {
     
    204208/**
    205209 * Register and Enqueue Scripts.
     210 *
     211 * @since Twenty Twenty 1.0
    206212 */
    207213function twentytwenty_register_scripts() {
     
    225231 * This does not enqueue the script because it is tiny and because it is only for IE11,
    226232 * thus it does not warrant having an entire dedicated blocking script being loaded.
     233 *
     234 * @since Twenty Twenty 1.0
    227235 *
    228236 * @link https://git.io/vWdr2
     
    238246add_action( 'wp_print_footer_scripts', 'twentytwenty_skip_link_focus_fix' );
    239247
    240 /** Enqueue non-latin language styles
     248/**
     249 * Enqueue non-latin language styles.
    241250 *
    242251 * @since Twenty Twenty 1.0
     
    256265/**
    257266 * Register navigation menus uses wp_nav_menu in five places.
     267 *
     268 * @since Twenty Twenty 1.0
    258269 */
    259270function twentytwenty_menus() {
     
    274285/**
    275286 * Get the information about the logo.
     287 *
     288 * @since Twenty Twenty 1.0
    276289 *
    277290 * @param string $html The HTML output from get_custom_logo (core function).
     
    332345    /**
    333346     * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2.
     347     *
     348     * @since Twenty Twenty 1.0
    334349     */
    335350    function wp_body_open() {
     351        /** This action is documented in wp-includes/general-template.php */
    336352        do_action( 'wp_body_open' );
    337353    }
     
    340356/**
    341357 * Include a skip to content link at the top of the page so that users can bypass the menu.
     358 *
     359 * @since Twenty Twenty 1.0
    342360 */
    343361function twentytwenty_skip_link() {
     
    349367/**
    350368 * Register widget areas.
     369 *
     370 * @since Twenty Twenty 1.0
    351371 *
    352372 * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
     
    392412/**
    393413 * Enqueue supplemental block editor styles.
     414 *
     415 * @since Twenty Twenty 1.0
    394416 */
    395417function twentytwenty_block_editor_styles() {
     
    413435/**
    414436 * Enqueue classic editor styles.
     437 *
     438 * @since Twenty Twenty 1.0
    415439 */
    416440function twentytwenty_classic_editor_styles() {
     
    429453 * Output Customizer settings in the classic editor.
    430454 * Adds styles to the head of the TinyMCE iframe. Kudos to @Otto42 for the original solution.
     455 *
     456 * @since Twenty Twenty 1.0
    431457 *
    432458 * @param array $mce_init TinyMCE styles.
     
    480506 * Block Editor Settings.
    481507 * Add custom colors and font sizes to the block editor.
     508 *
     509 * @since Twenty Twenty 1.0
    482510 */
    483511function twentytwenty_block_editor_settings() {
     
    633661 * @since Twenty Twenty 1.0
    634662 *
    635  * @param string $area The area we want to get the colors for.
     663 * @param string $area    The area we want to get the colors for.
    636664 * @param string $context Can be 'text' or 'accent'.
    637665 * @return string Returns a HEX color.
     
    751779
    752780    /**
    753     * Filters Twenty Twenty theme elements
    754     *
    755     * @since Twenty Twenty 1.0
    756     *
    757     * @param array Array of elements
    758     */
     781     * Filters Twenty Twenty theme elements.
     782     *
     783     * @since Twenty Twenty 1.0
     784     *
     785     * @param array Array of elements.
     786     */
    759787    return apply_filters( 'twentytwenty_get_elements_array', $elements );
    760788}
Note: See TracChangeset for help on using the changeset viewer.