Make WordPress Core


Ignore:
Timestamp:
01/11/2020 06:30:58 PM (5 years 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/post-template.php

    r46610 r47060  
    3838 * @param string $after  Optional. Markup to append to the title. Default empty.
    3939 * @param bool   $echo   Optional. Whether to echo or return the title. Default true for echo.
    40  * @return string|void Current post title if $echo is false.
     40 * @return void|string Void if `$echo` argument is true, current post title if `$echo` is false.
    4141 */
    4242function the_title( $before = '', $after = '', $echo = true ) {
     
    7676 *     @type WP_Post $post   Current post object to retrieve the title for.
    7777 * }
    78  * @return string|void String when echo is false.
     78 * @return void|string Void if 'echo' argument is true, the title attribute if 'echo' is false.
    7979 */
    8080function the_title_attribute( $args = '' ) {
     
    10631063 *
    10641064 * @param string $key Meta data key name.
    1065  * @return false|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist.
     1065 * @return array|string|false Array of values, or single value if only one element exists.
     1066 *                            False if the key does not exist.
    10661067 */
    10671068function post_custom( $key = '' ) {
     
    11541155 *                                               elements. Accepts any valid post field. Default 'ID'.
    11551156 * }
    1156  * @return string HTML content, if not displaying.
     1157 * @return string HTML dropdown list of pages.
    11571158 */
    11581159function wp_dropdown_pages( $args = '' ) {
     
    12121213        echo $html;
    12131214    }
     1215
    12141216    return $html;
    12151217}
     
    12531255 *     @type Walker       $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
    12541256 * }
    1255  * @return string|void HTML list of pages.
     1257 * @return void|string Void if 'echo' argument is true, HTML list of pages if 'echo' is false.
    12561258 */
    12571259function wp_list_pages( $args = '' ) {
     
    13741376 *     @type Walker          $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
    13751377 * }
    1376  * @return string|void HTML menu
     1378 * @return void|string Void if 'echo' argument is true, HTML menu if 'echo' is false.
    13771379 */
    13781380function wp_page_menu( $args = array() ) {
     
    14891491     */
    14901492    $menu = apply_filters( 'wp_page_menu', $menu, $args );
     1493
    14911494    if ( $args['echo'] ) {
    14921495        echo $menu;
Note: See TracChangeset for help on using the changeset viewer.