Make WordPress Core

Changeset 60536


Ignore:
Timestamp:
08/03/2025 03:25:29 PM (24 hours ago)
Author:
SergeyBiryukov
Message:

Twenty Twenty: Use third-person singular verbs for function descriptions.

Reference: PHP Documentation Standards: Documenting Tips.

Props vladimiraus, mukesh27, SergeyBiryukov.
See #63692.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/assets/js/color-calculations.js

    r47122 r60536  
    5050                item,
    5151                /**
    52                  * Get a score for this color in contrast to its background color and surrounding text.
     52                 * Gets a score for this color in contrast to its background color and surrounding text.
    5353                 *
    5454                 * @since Twenty Twenty 1.0
     
    111111
    112112/**
    113  * Get accessible text-color.
     113 * Gets accessible text-color.
    114114 *
    115115 * @since Twenty Twenty 1.0
     
    122122
    123123/**
    124  * Get accessible color for the defined accent-hue and background-color.
     124 * Gets accessible color for the defined accent-hue and background-color.
    125125 *
    126126 * @since Twenty Twenty 1.0
     
    142142
    143143/**
    144  * Return a new instance of the _twentyTwentyColor object.
     144 * Returns a new instance of the _twentyTwentyColor object.
    145145 *
    146146 * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/assets/js/customize-preview.js

    r52285 r60536  
    1010( function( $, api, _ ) {
    1111    /**
    12      * Return a value for our partial refresh.
     12     * Returns a value for our partial refresh.
    1313     *
    1414     * @since Twenty Twenty 1.0
     
    3232
    3333        /**
    34          * Override the refresh method.
     34         * Overrides the refresh method.
    3535         *
    3636         * @since Twenty Twenty 1.0
     
    6666
    6767        /**
    68          * Override the refresh method.
     68         * Overrides the refresh method.
    6969         *
    7070         * @since Twenty Twenty 1.0
     
    152152
    153153    /**
    154      * Add styles to elements in the preview pane.
     154     * Adds styles to elements in the preview pane.
    155155     *
    156156     * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

    r60478 r60536  
    1717
    1818        /**
    19          * Register customizer options.
     19         * Registers customizer options.
    2020         *
    2121         * @since Twenty Twenty 1.0
     
    2727            /**
    2828             * Site Title & Description.
    29              * */
     29             */
    3030            $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    3131            $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
     
    440440
    441441        /**
    442          * Sanitize select.
     442         * Sanitizes a select input.
    443443         *
    444444         * @since Twenty Twenty 1.0
     
    455455
    456456        /**
    457          * Sanitize boolean for checkbox.
     457         * Sanitizes a boolean for checkbox.
    458458         *
    459459         * @since Twenty Twenty 1.0
     
    477477if ( ! function_exists( 'twentytwenty_customize_partial_blogname' ) ) {
    478478    /**
    479      * Render the site title for the selective refresh partial.
     479     * Renders the site title for the selective refresh partial.
    480480     *
    481481     * @since Twenty Twenty 1.0
     
    488488if ( ! function_exists( 'twentytwenty_customize_partial_blogdescription' ) ) {
    489489    /**
    490      * Render the site description for the selective refresh partial.
     490     * Renders the site description for the selective refresh partial.
    491491     *
    492492     * @since Twenty Twenty 1.0
     
    499499if ( ! function_exists( 'twentytwenty_customize_partial_site_logo' ) ) {
    500500    /**
    501      * Render the site logo for the selective refresh partial.
     501     * Renders the site logo for the selective refresh partial.
    502502     *
    503503     * Doing it this way so we don't have issues with `render_callback`'s arguments.
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php

    r56548 r60536  
    1919
    2020        /**
    21          * Get custom CSS.
     21         * Gets custom CSS.
    2222         *
    23          * Return CSS for non-latin language, if available, or null
     23         * Returns CSS for non-latin language, if available, or null.
    2424         *
    2525         * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-separator-control.php

    r56547 r60536  
    1818        class TwentyTwenty_Separator_Control extends WP_Customize_Control {
    1919            /**
    20              * Render the hr.
     20             * Renders the hr.
    2121             *
    2222             * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-svg-icons.php

    r56547 r60536  
    1111    /**
    1212     * SVG ICONS CLASS
    13      * Retrieve the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
     13     * Retrieves the SVG code for the specified icon. Based on a solution in Twenty Nineteen.
    1414     *
    1515     * @since Twenty Twenty 1.0
     
    1818        /**
    1919         * GET SVG CODE
    20          * Get the SVG code for the specified icon
     20         * Gets the SVG code for the specified icon.
    2121         *
    2222         * @since Twenty Twenty 1.0
     
    121121        /**
    122122         * ICON STORAGE
    123          * Store the code for all SVGs in an array.
     123         * Stores the code for all SVGs in an array.
    124124         *
    125125         * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r60407 r60536  
    177177
    178178/**
    179  * Register block patterns and pattern categories.
     179 * Registers block patterns and pattern categories.
    180180 *
    181181 * @since Twenty Twenty 2.8
     
    188188
    189189/**
    190  * Register and Enqueue Styles.
     190 * Registers and Enqueues Styles.
    191191 *
    192192 * @since Twenty Twenty 1.0
     
    216216
    217217/**
    218  * Register and Enqueue Scripts.
     218 * Registers and Enqueues Scripts.
    219219 *
    220220 * @since Twenty Twenty 1.0
     
    241241
    242242/**
    243  * Fix skip link focus in IE11.
     243 * Fixes skip link focus in IE11.
    244244 *
    245245 * This does not enqueue the script because it is tiny and because it is only for IE11,
     
    261261
    262262/**
    263  * Enqueue non-latin language styles.
     263 * Enqueues non-latin language styles.
    264264 *
    265265 * @since Twenty Twenty 1.0
     
    278278
    279279/**
    280  * Register navigation menus uses wp_nav_menu in five places.
     280 * Registers navigation menus.
     281 *
     282 * This theme uses wp_nav_menu() in five places.
    281283 *
    282284 * @since Twenty Twenty 1.0
     
    298300
    299301/**
    300  * Get the information about the logo.
    301  *
    302  * @since Twenty Twenty 1.0
    303  *
    304  * @param string $html The HTML output from get_custom_logo (core function).
     302 * Gets the information about the logo.
     303 *
     304 * @since Twenty Twenty 1.0
     305 *
     306 * @param string $html The HTML output from get_custom_logo() (core function).
    305307 * @return string
    306308 */
     
    357359
    358360    /**
    359      * Shim for wp_body_open, ensuring backward compatibility with versions of WordPress older than 5.2.
     361     * Shim for wp_body_open(), ensuring backward compatibility with versions of WordPress older than 5.2.
    360362     *
    361363     * @since Twenty Twenty 1.0
     
    386388
    387389/**
    388  * Register widget areas.
     390 * Registers widget areas.
    389391 *
    390392 * @since Twenty Twenty 1.0
     
    430432
    431433/**
    432  * Enqueue supplemental block editor styles.
     434 * Enqueues supplemental block editor styles.
    433435 *
    434436 * @since Twenty Twenty 1.0
     
    467469
    468470/**
    469  * Enqueue classic editor styles.
     471 * Enqueues classic editor styles.
    470472 *
    471473 * @since Twenty Twenty 1.0
     
    541543/**
    542544 * Block Editor Settings.
    543  * Add custom colors and font sizes to the block editor.
     545 * Adds custom colors and font sizes to the block editor.
    544546 *
    545547 * @since Twenty Twenty 1.0
     
    666668
    667669/**
    668  * Enqueue scripts for the customizer preview.
     670 * Enqueues scripts for the customizer preview.
    669671 *
    670672 * @since Twenty Twenty 1.0
     
    692694
    693695/**
    694  * Get accessible color for an area.
     696 * Gets accessible color for an area.
    695697 *
    696698 * @since Twenty Twenty 1.0
     
    750752
    751753/**
    752  * Get an array of elements.
     754 * Gets an array of elements.
    753755 *
    754756 * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r56783 r60536  
    1111
    1212    /**
    13      * Generate CSS.
     13     * Generates CSS.
    1414     *
    1515     * @since Twenty Twenty 1.0
     
    4949
    5050    /**
    51      * Get CSS Built from Customizer Options.
    52      * Build CSS reflecting colors, fonts and other options set in the Customizer, and return them for output.
     51     * Gets CSS Built from Customizer Options.
     52     * Builds CSS reflecting colors, fonts and other options set in the Customizer, and returns them for output.
    5353     *
    5454     * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php

    r56548 r60536  
    1111
    1212/**
    13  * Function to return the array of starter content for the theme.
     13 * Returns the array of starter content for the theme.
    1414 *
    1515 * Passes it through the `twentytwenty_starter_content` filter before returning.
  • trunk/src/wp-content/themes/twentytwenty/inc/svg-icons.php

    r51322 r60536  
    1010if ( ! function_exists( 'twentytwenty_the_theme_svg' ) ) {
    1111    /**
    12      * Output and Get Theme SVG.
    13      * Output and get the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
     12     * Outputs the SVG markup for an icon in the TwentyTwenty_SVG_Icons class.
    1413     *
    1514     * @since Twenty Twenty 1.0
     
    2726
    2827    /**
    29      * Get information about the SVG icon.
     28     * Gets information about the SVG icon.
    3029     *
    3130     * @since Twenty Twenty 1.0
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r60483 r60536  
    170170 * Filters comment reply link to not JS scroll.
    171171 *
    172  * Filter the comment reply link to add a class indicating it should not use JS slow-scroll, as it
     172 * Filters the comment reply link to add a class indicating it should not use JS slow-scroll, as it
    173173 * makes it scroll to the wrong position on the page.
    174174 *
     
    539539 * Filters classes of wp_list_pages items to match menu items.
    540540 *
    541  * Filter the class applied to wp_list_pages() items with children to match the menu class, to simplify.
     541 * Filters the class applied to wp_list_pages() items with children to match the menu class, to simplify
    542542 * styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
    543543 *
  • trunk/src/wp-content/themes/twentytwentyone/inc/starter-content.php

    r55431 r60536  
    1111
    1212/**
    13  * Function to return the array of starter content for the theme.
     13 * Returns the array of starter content for the theme.
    1414 *
    1515 * Passes it through the `twenty_twenty_one_starter_content` filter before returning.
Note: See TracChangeset for help on using the changeset viewer.