populate_roles_230 example


function upgrade_230() {
    global $wp_current_db_version$wpdb;

    if ( $wp_current_db_version < 5200 ) {
        populate_roles_230();
    }

    // Convert categories to terms.     $tt_ids     = array();
    $have_tags  = false;
    $categories = $wpdb->get_results( "SELECT * FROM $wpdb->categories ORDER BY cat_ID" );
    foreach ( $categories as $category ) {
        $term_id     = (int) $category->cat_ID;
        $name        = $category->cat_name;
        $description = $category->category_description;
        $slug        = $category->category_nicename;
        
    delete_expired_transients( true );
}

/** * Execute WordPress role creation for the various WordPress versions. * * @since 2.0.0 */
function populate_roles() {
    populate_roles_160();
    populate_roles_210();
    populate_roles_230();
    populate_roles_250();
    populate_roles_260();
    populate_roles_270();
    populate_roles_280();
    populate_roles_300();
}

/** * Create the roles for WordPress 2.0 * * @since 2.0.0 */
Home | Imprint | This part of the site doesn't use cookies.