populate_roles_210 example

// Clear expired transients.     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 */
 elseif ( 'attachment' === $status ) {
                    $status = 'inherit';
                    $type   = 'attachment';
                }

                $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_status = %s, post_type = %s WHERE ID = %d", $status$type$post->ID ) );
            }
        }
    }

    if ( $wp_current_db_version < 3845 ) {
        populate_roles_210();
    }

    if ( $wp_current_db_version < 3531 ) {
        // Give future posts a post_status of future.         $now = gmdate( 'Y-m-d H:i:59' );
        $wpdb->query( "UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' AND post_date_gmt > '$now'" );

        $posts = $wpdb->get_results( "SELECT ID, post_date FROM $wpdb->posts WHERE post_status ='future'" );
        if ( ! empty( $posts ) ) {
            foreach ( $posts as $post ) {
                wp_schedule_single_event( mysql2date( 'U', $post->post_date, false ), 'publish_future_post', array( $post->ID ) );
            }
Home | Imprint | This part of the site doesn't use cookies.