_wp_get_post_revision_version

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

WordPress Version: 4.3

/**
 * Gets the post revision version.
 *
 * @since 3.6.0
 * @access private
 *
 * @param WP_Post $revision
 * @return int|false
 */
function _wp_get_post_revision_version($revision)
{
    if (is_object($revision)) {
        $revision = get_object_vars($revision);
    } elseif (!is_array($revision)) {
        return false;
    }
    if (preg_match('/^\d+-(?:autosave|revision)-v(\d+)$/', $revision['post_name'], $matches)) {
        return (int) $matches[1];
    }
    return 0;
}

WordPress Version: 3.7

/**
 * Gets the post revision version.
 *
 * @since 3.6.0
 * @access private
*/
function _wp_get_post_revision_version($revision)
{
    if (is_object($revision)) {
        $revision = get_object_vars($revision);
    } elseif (!is_array($revision)) {
        return false;
    }
    if (preg_match('/^\d+-(?:autosave|revision)-v(\d+)$/', $revision['post_name'], $matches)) {
        return (int) $matches[1];
    }
    return 0;
}