Make WordPress Core

Changeset 61719


Ignore:
Timestamp:
02/23/2026 07:04:18 AM (13 days ago)
Author:
westonruter
Message:

Code Quality: Return null instead of void in paginate_links().

Developed in https://github.com/WordPress/wordpress-develop/pull/10999

Follow-up to r32598.

Props apermo, mukesh27, westonruter
See #64238.
Fixes #64694.

File:
1 edited

Legend:

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

    r61651 r61719  
    46564656 *     @type string $after_page_number  A string to append after the page number. Default empty.
    46574657 * }
    4658  * @return string|string[]|void String of page links or array of page links, depending on 'type' argument.
    4659  *                              Void if total number of pages is less than 2.
     4658 * @return string|string[]|null String of page links or array of page links, depending on 'type' argument.
     4659 *                              Null if total number of pages is less than 2.
    46604660 */
    46614661function paginate_links( $args = '' ) {
     
    47234723    $total = (int) $args['total'];
    47244724    if ( $total < 2 ) {
    4725         return;
     4725        return null;
    47264726    }
    47274727    $current  = (int) $args['current'];
Note: See TracChangeset for help on using the changeset viewer.