the_comment

The timeline below displays how wordpress function the_comment has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Iterate comment index in the comment loop.
 *
 * @since 2.2.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 */
function the_comment()
{
    global $wp_query;
    if (!isset($wp_query)) {
        return;
    }
    $wp_query->the_comment();
}

WordPress Version: 5.6

/**
 * Iterate comment index in the comment loop.
 *
 * @since 2.2.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 *
 * @return null
 */
function the_comment()
{
    global $wp_query;
    return $wp_query->the_comment();
}

WordPress Version: 5.3

/**
 * Iterate comment index in the comment loop.
 *
 * @since 2.2.0
 *
 * @global WP_Query $wp_query WordPress Query object.
 *
 * @return object
 */
function the_comment()
{
    global $wp_query;
    return $wp_query->the_comment();
}

WordPress Version: 4.4

/**
 * Iterate comment index in the comment loop.
 *
 * @since 2.2.0
 *
 * @global WP_Query $wp_query Global WP_Query instance.
 *
 * @return object
 */
function the_comment()
{
    global $wp_query;
    return $wp_query->the_comment();
}

WordPress Version: 4.3

/**
 * Iterate comment index in the comment loop.
 *
 * @since 2.2.0
 *
 * @global WP_Query $wp_query
 *
 * @return object
 */
function the_comment()
{
    global $wp_query;
    return $wp_query->the_comment();
}

WordPress Version: 3.7

/**
 * Iterate comment index in the comment loop.
 *
 * @see WP_Query::the_comment()
 * @since 2.2.0
 * @uses $wp_query
 *
 * @return object
 */
function the_comment()
{
    global $wp_query;
    return $wp_query->the_comment();
}