WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/11/2020 06:30:58 PM (13 months ago)
Author:
SergeyBiryukov
Message:

Docs: In various @return tags, list the expected type first, instead of false.

Follow-up to [46696].

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r46823 r47060  
    197197 *                              accessibility. Default empty.
    198198 * }
    199  * @return string|void String when the $echo param is false.
     199 * @return void|string Void if 'echo' argument is true, search form HTML if 'echo' is false.
    200200 */
    201201function get_search_form( $args = array() ) {
     
    301301    }
    302302
    303     if ( isset( $args['echo'] ) && $args['echo'] ) {
     303    if ( $args['echo'] ) {
    304304        echo $result;
    305305    } else {
     
    427427 * Provides a simple login form for use anywhere within WordPress.
    428428 *
    429  * The login format HTML is echoed by default. Pass a false value for `$echo` to return it instead.
     429 * The login form HTML is echoed by default. Pass a false value for `$echo` to return it instead.
    430430 *
    431431 * @since 3.0.0
     
    453453 *
    454454 * }
    455  * @return string|void String when retrieving.
     455 * @return void|string Void if 'echo' argument is true, login form HTML if 'echo' is false.
    456456 */
    457457function wp_login_form( $args = array() ) {
     
    18071807 *     @type string     $w               Week. Default current week.
    18081808 * }
    1809  * @return string|void String when retrieving.
     1809 * @return void|string Void if 'echo' argument is true, archive links if 'echo' is false.
    18101810 */
    18111811function wp_get_archives( $args = '' ) {
     
    20202020        }
    20212021    }
     2022
    20222023    if ( $parsed_args['echo'] ) {
    20232024        echo $output;
     
    23902391 * @param  string      $d    Optional. PHP date format defaults to the date_format option if not specified.
    23912392 * @param  int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
    2392  * @return false|string Date the current post was written. False on failure.
     2393 * @return string|false Date the current post was written. False on failure.
    23932394 */
    23942395function get_the_date( $d = '', $post = null ) {
     
    24612462 * @param string      $d    Optional. PHP date format defaults to the date_format option if not specified.
    24622463 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
    2463  * @return false|string Date the current post was modified. False on failure.
     2464 * @return string|false Date the current post was modified. False on failure.
    24642465 */
    24652466function get_the_modified_date( $d = '', $post = null ) {
     
    27062707 *                           to the value specified in the time_format option. Default empty.
    27072708 * @param int|WP_Post $post  Optional. Post ID or WP_Post object. Default current post.
    2708  * @return false|string Formatted date string or Unix timestamp. False on failure.
     2709 * @return string|false Formatted date string or Unix timestamp. False on failure.
    27092710 */
    27102711function get_the_modified_time( $d = '', $post = null ) {
     
    40714072 *     @type string $after_page_number  A string to append after the page number. Default empty.
    40724073 * }
    4073  * @return string|array|void String of page links or array of page links.
     4074 * @return string|array|void String of page links or array of page links, depending on 'type' argument.
     4075 *                           Void if total number of pages is less than 2.
    40744076 */
    40754077function paginate_links( $args = '' ) {
Note: See TracChangeset for help on using the changeset viewer.