upgrade_421

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

WordPress Version: .10

/**
 * Execute changes made in WordPress 4.2.1.
 *
 * @since 4.2.1
 */
function upgrade_421()
{
}

WordPress Version: 2.1

/**
 * Execute changes made in WordPress 4.2.1.
 *
 * @since 4.2.1
 */
function upgrade_421()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 31533) {
        $content_length = $wpdb->get_col_length($wpdb->comments, 'comment_content');
        if (!$content_length) {
            $content_length = 65535;
        }
        $comments = $wpdb->get_results("SELECT comment_ID FROM {$wpdb->comments}\n\t\t\tWHERE comment_date_gmt > '2015-04-26'\n\t\t\tAND CHAR_LENGTH( comment_content ) >= {$content_length}\n\t\t\tAND ( comment_content LIKE '%<%' OR comment_content LIKE '%>%' )");
        foreach ($comments as $comment) {
            wp_delete_comment($comment->comment_ID, true);
        }
    }
}