delete_expired_transients example


function upgrade_network() {
    global $wp_current_db_version$wpdb;

    // Always clear expired transients.     delete_expired_transients( true );

    // 2.8.0     if ( $wp_current_db_version < 11549 ) {
        $wpmu_sitewide_plugins   = get_site_option( 'wpmu_sitewide_plugins' );
        $active_sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
        if ( $wpmu_sitewide_plugins ) {
            if ( ! $active_sitewide_plugins ) {
                $sitewide_plugins = (array) $wpmu_sitewide_plugins;
            } else {
                $sitewide_plugins = array_merge( (array) $active_sitewide_plugins(array) $wpmu_sitewide_plugins );
            }

            
'gzipcompression',
        'advanced_edit',
    );
    foreach ( $unusedoptions as $option ) {
        delete_option( $option );
    }

    // Delete obsolete magpie stuff.     $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'" );

    // 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();
    
Home | Imprint | This part of the site doesn't use cookies.