Make WordPress Core

Changeset 48102


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

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

See #49572.

Location:
trunk/src
Files:
29 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r47234 r48102  
    659659     * @param WP_Post $post
    660660     * @param string  $att_title
    661      *
    662661     * @return array
    663662     */
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r47815 r48102  
    149149     *
    150150     * @param $callback
    151      *
    152151     * @return mixed|void
    153152     */
     
    791790     * @param string $constant  Optional. The constant name to test for. Default null.
    792791     * @param string $class     Optional. The class name to test for. Default null.
    793      *
    794792     * @return bool Whether or not the extension and function are available.
    795793     */
  • trunk/src/wp-admin/includes/comment.php

    r47808 r48102  
    2222 * @param string $comment_date   Date of the comment.
    2323 * @param string $timezone       Timezone. Accepts 'blog' or 'gmt'. Default 'blog'.
    24  *
    2524 * @return mixed Comment post ID on success.
    2625 */
  • trunk/src/wp-admin/includes/file.php

    r48067 r48102  
    19771977 *                                                    the post. Default null.
    19781978 * @param bool          $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
    1979  *
    19801979 * @return bool|array True if no filesystem credentials are required, false if they are required but have not been
    19811980 *                    provided, array of credentials if they are required and have been provided.
  • trunk/src/wp-admin/includes/misc.php

    r48100 r48102  
    14021402 * @param string  $title Page title.
    14031403 * @param WP_Post $page  Page data object.
    1404  *
    14051404 * @return string Page title.
    14061405 */
  • trunk/src/wp-admin/includes/revision.php

    r47557 r48102  
    1616 * @param int         $compare_from The revision ID to compare from.
    1717 * @param int         $compare_to   The revision ID to come to.
    18  *
    1918 * @return array|bool Associative array of a post's revisioned fields and their diffs.
    2019 *                    Or, false on failure.
     
    162161 * @param int         $selected_revision_id The selected revision ID.
    163162 * @param int         $from                 Optional. The revision ID to compare from.
    164  *
    165163 * @return array An associative array of revision data and related settings.
    166164 */
  • trunk/src/wp-content/themes/twentynineteen/inc/customizer.php

    r46827 r48102  
    142142 *
    143143 * @param string $choice Whether image filter is active.
    144  *
    145144 * @return string
    146145 */
  • trunk/src/wp-content/themes/twentyseventeen/functions.php

    r48101 r48102  
    590590 *
    591591 * @param string $template front-page.php.
    592  *
    593  * @return string The template to be used: blank if is_home() is true (defaults to index.php), else $template.
     592 * @return string The template to be used: blank if is_home() is true (defaults to index.php),
     593 *                otherwise $template.
    594594 */
    595595function twentyseventeen_front_page_template( $template ) {
     
    618618
    619619/**
    620  * Get unique ID.
     620 * Gets unique ID.
    621621 *
    622622 * This is a PHP implementation of Underscore's uniqueId method. A static variable
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

    r46827 r48102  
    417417         * @since Twenty Twenty 1.0
    418418         * @param array $value The value we want to sanitize.
    419          * @return array       Returns sanitized value. Each item in the array gets sanitized separately.
     419         * @return array Returns sanitized value. Each item in the array gets sanitized separately.
    420420         */
    421421        public static function sanitize_accent_accessible_colors( $value ) {
     
    439439         * @param string $input The input from the setting.
    440440         * @param object $setting The selected setting.
    441          *
    442          * @return string $input|$setting->default The input from the setting or the default setting.
     441         * @return string The input from the setting or the default setting.
    443442         */
    444443        public static function sanitize_select( $input, $setting ) {
     
    452451         *
    453452         * @param bool $checked Whether or not a box is checked.
    454          *
    455453         * @return bool
    456454         */
  • trunk/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-non-latin-languages.php

    r47122 r48102  
    2222         *
    2323         * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
    24          *
    2524         * @return void
    2625         */
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r47933 r48102  
    272272 *
    273273 * @param string $html The HTML output from get_custom_logo (core function).
    274  *
    275  * @return string $html
     274 * @return string
    276275 */
    277276function twentytwenty_get_custom_logo( $html ) {
     
    428427 *
    429428 * @param array $mce_init TinyMCE styles.
    430  *
    431  * @return array $mce_init TinyMCE styles.
     429 * @return array TinyMCE styles.
    432430 */
    433431function twentytwenty_add_classic_editor_customizer_styles( $mce_init ) {
     
    452450 *
    453451 * @param array $mce_init TinyMCE styles.
    454  *
    455  * @return array $mce_init TinyMCE styles.
     452 * @return array TinyMCE styles.
    456453 */
    457454function twentytwenty_add_classic_editor_non_latin_styles( $mce_init ) {
     
    570567 *
    571568 * @param string $html The default output HTML for the more tag.
    572  *
    573  * @return string $html
     569 * @return string
    574570 */
    575571function twentytwenty_read_more_tag( $html ) {
  • trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php

    r47388 r48102  
    1616 *
    1717 * @since Twenty Twenty 1.0
    18  * @return array a filtered array of args for the starter_content.
     18 *
     19 * @return array A filtered array of args for the starter_content.
    1920 */
    2021function twentytwenty_get_starter_content() {
  • 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
  • trunk/src/wp-includes/blocks.php

    r48067 r48102  
    590590 *
    591591 * @param string $block_name       Block type name including namespace.
    592  * @param array  $style_properties Array containing the properties of the style name, label, style (name of the stylesheet to be enqueued), inline_style (string containing the CSS to be added).
    593  *
     592 * @param array  $style_properties Array containing the properties of the style name,
     593 *                                 label, style (name of the stylesheet to be enqueued),
     594 *                                 inline_style (string containing the CSS to be added).
    594595 * @return boolean True if the block style was registered with success and false otherwise.
    595596 */
     
    605606 * @param string $block_name       Block type name including namespace.
    606607 * @param array  $block_style_name Block style name.
    607  *
    608608 * @return boolean True if the block style was unregistered with success and false otherwise.
    609609 */
  • trunk/src/wp-includes/class-http.php

    r48067 r48102  
    512512     * @param array $args Request arguments.
    513513     * @param string $url URL to Request.
    514      *
    515514     * @return string|false Class name for the first transport that claims to support the request.
    516515     *                      False if no transport claims to support the request.
  • trunk/src/wp-includes/class-wp-date-query.php

    r47851 r48102  
    178178     *
    179179     * Ensures that each query-level clause has a 'relation' key, and that
    180      * each first-order clause contains all the necessary keys from
    181      * `$defaults`.
     180     * each first-order clause contains all the necessary keys from `$defaults`.
    182181     *
    183182     * @since 4.1.0
     
    185184     * @param array $queries
    186185     * @param array $parent_query
    187      *
    188186     * @return array Sanitized queries.
    189187     */
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r47219 r48102  
    210210     * @param int $width
    211211     * @param int $height
    212      *
    213212     * @return true|WP_Error
    214213     */
  • trunk/src/wp-includes/class-wp-network-query.php

    r47808 r48102  
    510510     * @param string   $string  Search string.
    511511     * @param string[] $columns Array of columns to search.
    512      *
    513512     * @return string Search SQL.
    514513     */
  • trunk/src/wp-includes/class-wp-paused-extensions-storage.php

    r47122 r48102  
    8181     *
    8282     * @param string $extension Plugin or theme directory name.
    83      *
    8483     * @return bool True on success, false on failure.
    8584     */
     
    122121     *
    123122     * @param string $extension Plugin or theme directory name.
    124      *
    125123     * @return array|null Error that is stored, or null if the extension is not paused.
    126124     */
  • trunk/src/wp-includes/class-wp-recovery-mode-email-service.php

    r47122 r48102  
    102102     * @param array $error      Error details from {@see error_get_last()}
    103103     * @param array $extension  Extension that caused the error.
    104      *
    105104     * @return bool Whether the email was sent successfully.
    106105     */
  • trunk/src/wp-includes/class-wp-recovery-mode.php

    r47122 r48102  
    341341     *
    342342     * @param array  $error Error that was triggered.
    343      *
    344343     * @return array|false {
    345344     *      @type string  $slug  The extension slug. This is the plugin or theme's directory.
  • trunk/src/wp-includes/compat.php

    r47550 r48102  
    346346     *
    347347     * @param mixed $var The value to check.
    348      *
    349348     * @return bool True if `$var` is countable, false otherwise.
    350349     */
     
    368367     *
    369368     * @param mixed $var The value to check.
    370      *
    371369     * @return bool True if `$var` is iterable, false otherwise.
    372370     */
  • trunk/src/wp-includes/embed.php

    r47947 r48102  
    5858 *
    5959 * @param string $url Optional. The URL that should be embedded. Default empty.
    60  *
    6160 * @return array {
    6261 *     Indexed array of the embed width and height in pixels.
  • trunk/src/wp-includes/error-protection.php

    r47122 r48102  
    4343 *
    4444 * @param array $error Error details {@see error_get_last()}
    45  *
    4645 * @return string Formatted error description.
    4746 */
  • trunk/src/wp-includes/link-template.php

    r48100 r48102  
    101101 * @param int|WP_Post $post      Optional. Post ID or post object. Default is the global `$post`.
    102102 * @param bool        $leavename Optional. Whether to keep post name or page name. Default false.
    103  *
    104103 * @return string|false The permalink URL or false if post does not exist.
    105104 */
     
    44384437 * @param string $before Optional. Display before privacy policy link. Default empty.
    44394438 * @param string $after  Optional. Display after privacy policy link. Default empty.
    4440  *
    44414439 * @return string Markup for the link and surrounding elements. Empty string if it
    44424440 *                doesn't exist.
  • trunk/src/wp-includes/rest-api.php

    r47923 r48102  
    716716 * Recursively computes the intersection of arrays using keys for comparison.
    717717 *
     718 * @since 5.3.0
     719 *
    718720 * @param  array $array1 The array with master keys to check.
    719721 * @param  array $array2 An array to compare keys against.
    720  *
    721  * @return array An associative array containing all the entries of array1 which have keys that are present in all arguments.
     722 * @return array An associative array containing all the entries of array1 which have keys
     723 *               that are present in all arguments.
    722724 */
    723725function _rest_array_intersect_key_recursive( $array1, $array2 ) {
     
    739741 * @param WP_REST_Server   $server   ResponseHandler instance (usually WP_REST_Server).
    740742 * @param WP_REST_Request  $request  The request that was used to make current response.
    741  *
    742743 * @return WP_REST_Response Response to be served, trimmed down to contain a subset of fields.
    743744 */
  • trunk/src/wp-includes/rest-api/class-wp-rest-request.php

    r47559 r48102  
    403403     *
    404404     * @param string $key Parameter name.
    405      *
    406405     * @return bool True if a param exists for the given key.
    407406     */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php

    r47850 r48102  
    400400     * @param WP_Post         $post    Post revision object.
    401401     * @param WP_REST_Request $request Request object.
    402      *
    403402     * @return WP_REST_Response Response object.
    404403     */
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

    r48100 r48102  
    162162     * @param WP_REST_Request $request Full details about the request.
    163163     * @param string          $param   The parameter that is being sanitized.
    164      *
    165164     * @return int|bool|WP_Error
    166165     */
Note: See TracChangeset for help on using the changeset viewer.