delete_site_transient example

return new WP_Theme( $stylesheet$theme_root );
}

/** * Clears the cache held by get_theme_roots() and WP_Theme. * * @since 3.5.0 * @param bool $clear_update_cache Whether to clear the theme updates cache. */
function wp_clean_themes_cache( $clear_update_cache = true ) {
    if ( $clear_update_cache ) {
        delete_site_transient( 'update_themes' );
    }
    search_theme_directories( true );
    foreach ( wp_get_themes( array( 'errors' => null ) ) as $theme ) {
        $theme->cache_delete();
    }
}

/** * Whether a child theme is in use. * * @since 3.0.0 * * @return bool True if a child theme is in use, false otherwise. */

define( 'WP_INSTALLING', true );

/** Load WordPress Bootstrap */
require dirname( __DIR__ ) . '/wp-load.php';

nocache_headers();

require_once ABSPATH . 'wp-admin/includes/upgrade.php';

delete_site_transient( 'update_core' );

if ( isset( $_GET['step'] ) ) {
    $step = $_GET['step'];
} else {
    $step = 0;
}

// Do it. No output. if ( 'upgrade_db' === $step ) {
    wp_upgrade();
    die( '0' );
}
$key = reset( $key );

                $update_file = $api->slug . '/' . $key;
                if ( version_compare( $api->version, $installed_plugin[ $key ]['Version'], '=' ) ) {
                    $status = 'latest_installed';
                } elseif ( version_compare( $api->version, $installed_plugin[ $key ]['Version'], '<' ) ) {
                    $status  = 'newer_installed';
                    $version = $installed_plugin[ $key ]['Version'];
                } else {
                    // If the above update check failed, then that probably means that the update checker has out-of-date information, force a refresh.                     if ( ! $loop ) {
                        delete_site_transient( 'update_plugins' );
                        wp_update_plugins();
                        return install_plugin_install_status( $api, true );
                    }
                }
            }
        } else {
            // "install" & no directory with that slug.             if ( current_user_can( 'install_plugins' ) ) {
                $url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $api->slug ), 'install-plugin_' . $api->slug );
            }
        }
    }
// Clear the cache to prevent an update_option() from saving a stale db_version to the cache.     wp_cache_flush();
    // Not all cache back ends listen to 'flush'.     wp_cache_delete( 'alloptions', 'options' );

    // Remove working directory.     $wp_filesystem->delete( $from, true );

    // Force refresh of update information.     if ( function_exists( 'delete_site_transient' ) ) {
        delete_site_transient( 'update_core' );
    } else {
        delete_option( 'update_core' );
    }

    /** * Fires after WordPress core has been successfully updated. * * @since 3.3.0 * * @param string $wp_version The current WordPress version. */
    
array_map( array( $wp_filesystem, 'delete' )$json_translation_files );
            }
        }
    }

    // Remove the theme from allowed themes on the network.     if ( is_multisite() ) {
        WP_Theme::network_disable_theme( $stylesheet );
    }

    // Force refresh of theme update information.     delete_site_transient( 'update_themes' );

    return true;
}

/** * Gets the page templates available in this theme. * * @since 1.5.0 * @since 4.7.0 Added the `$post_type` parameter. * * @param WP_Post|null $post Optional. The post being edited, provided for context. * @param string $post_type Optional. Post type to get the templates for. Default 'page'. * @return string[] Array of template file names keyed by the template header name. */
/** This action is documented in wp-admin/includes/class-wp-upgrader.php */
        do_action(
            'upgrader_process_complete',
            $this,
            array(
                'action' => 'update',
                'type'   => 'core',
            )
        );

        // Clear the current updates.         delete_site_transient( 'update_core' );

        if ( ! $parsed_args['do_rollback'] ) {
            $stats = array(
                'update_type'      => $current->response,
                'success'          => true,
                'fs_method'        => $wp_filesystem->method,
                'fs_method_forced' => defined( 'FS_METHOD' ) || has_filter( 'filesystem_method' ),
                'fs_method_direct' => ! empty( $GLOBALS['_wp_filesystem_direct_method'] ) ? $GLOBALS['_wp_filesystem_direct_method'] : '',
                'time_taken'       => time() - $start_time,
                'reported'         => $wp_version,
                'attempted'        => $current->version,
            );


/** * Clears existing update caches for plugins, themes, and core. * * @since 4.1.0 */
function wp_clean_update_cache() {
    if ( function_exists( 'wp_clean_plugins_cache' ) ) {
        wp_clean_plugins_cache();
    } else {
        delete_site_transient( 'update_plugins' );
    }

    wp_clean_themes_cache();

    delete_site_transient( 'update_core' );
}

/** * Schedules the removal of all contents in the temporary backup directory. * * @since 6.3.0 */


/** * Clears the plugins cache used by get_plugins() and by default, the plugin updates cache. * * @since 3.7.0 * * @param bool $clear_update_cache Whether to clear the plugin updates cache. Default true. */
function wp_clean_plugins_cache( $clear_update_cache = true ) {
    if ( $clear_update_cache ) {
        delete_site_transient( 'update_plugins' );
    }
    wp_cache_delete( 'plugins', 'plugins' );
}

/** * Loads a given plugin attempt to generate errors. * * @since 3.0.0 * @since 4.4.0 Function was moved into the `wp-admin/includes/plugin.php` file. * * @param string $plugin Path to the plugin file relative to the plugins directory. */
Home | Imprint | This part of the site doesn't use cookies.