Make WordPress Core


Ignore:
Timestamp:
09/09/2015 02:50:43 AM (9 years ago)
Author:
wonderboymusic
Message:

After [33891], get_comment() returns global $comment if no args are passed and the global is set (after setting the default to null here). This allows us to ditch global comment imports.

See #33638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-functions.php

    r33954 r33963  
    170170 * @return WP_Comment|array|null Depends on $output value.
    171171 */
    172 function get_comment(&$comment, $output = OBJECT) {
     172function get_comment( &$comment = null, $output = OBJECT ) {
    173173    if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) {
    174174        $comment = $GLOBALS['comment'];
Note: See TracChangeset for help on using the changeset viewer.