Make WordPress Core

Ticket #41699: 41699.4.diff

File 41699.4.diff, 1.6 KB (added by dlh, 8 years ago)
  • src/wp-admin/admin.php

     
    8787if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
    8888        wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
    8989
     90// Schedule Transient cleanup.
     91if ( ! wp_next_scheduled( 'delete_expired_transients' ) && ! wp_installing() ) {
     92        wp_schedule_event( time(), 'daily', 'delete_expired_transients' );
     93}
     94
    9095set_screen_options();
    9196
    9297$date_format = __( 'F j, Y' );
     
    9499
    95100wp_enqueue_script( 'common' );
    96101
    97 
    98 
    99 
    100102/**
    101103 * $pagenow is set in vars.php
    102104 * $wp_importers is sometimes set in wp-admin/includes/import.php
  • src/wp-includes/option.php

     
    820820 * Deletes all expired transients.
    821821 *
    822822 * The multi-table delete syntax is used to delete the transient record
    823  * from table a, and the corresponding transient_timeout record from table b.                           +
     823 * from table a, and the corresponding transient_timeout record from table b.
    824824 *
    825825 * @since 4.9.0
    826826 *
    827827 * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used.
    828828 */
    829 function delete_expired_transients( $force_db = false) {
     829function delete_expired_transients( $force_db = false ) {
    830830        global $wpdb;
    831831
    832832        if ( ! $force_db && wp_using_ext_object_cache() ) {