upgrade_270

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

WordPress Version: 5.4

/**
 * Execute changes made in WordPress 2.7.
 *
 * @ignore
 * @since 2.7.0
 *
 * @global int  $wp_current_db_version The old (current) database version.
 * @global wpdb $wpdb                  WordPress database abstraction object.
 */
function upgrade_270()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp.
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}

WordPress Version: 5.3

/**
 * Execute changes made in WordPress 2.7.
 *
 * @ignore
 * @since 2.7.0
 *
 * @global int  $wp_current_db_version The old (current) database version.
 * @global wpdb $wpdb                  WordPress database abstraction object.
 */
function upgrade_270()
{
    global $wp_current_db_version, $wpdb;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}

WordPress Version: 4.5

/**
 * Execute changes made in WordPress 2.7.
 *
 * @ignore
 * @since 2.7.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 * @global int  $wp_current_db_version
 */
function upgrade_270()
{
    global $wpdb, $wp_current_db_version;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}

WordPress Version: 4.4

/**
 * Execute changes made in WordPress 2.7.
 *
 * @since 2.7.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 * @global int  $wp_current_db_version
 */
function upgrade_270()
{
    global $wpdb, $wp_current_db_version;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}

WordPress Version: 4.3

/**
 * Execute changes made in WordPress 2.7.
 *
 * @since 2.7.0
 *
 * @global wpdb $wpdb
 * @global int  $wp_current_db_version
 */
function upgrade_270()
{
    global $wpdb, $wp_current_db_version;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}

WordPress Version: 3.7

/**
 * Execute changes made in WordPress 2.7.
 *
 * @since 2.7.0
 */
function upgrade_270()
{
    global $wpdb, $wp_current_db_version;
    if ($wp_current_db_version < 8980) {
        populate_roles_270();
    }
    // Update post_date for unpublished posts with empty timestamp
    if ($wp_current_db_version < 8921) {
        $wpdb->query("UPDATE {$wpdb->posts} SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'");
    }
}