WordPress.org

Make WordPress Core

Changeset 42008


Ignore:
Timestamp:
10/24/2017 11:00:01 PM (21 months ago)
Author:
SergeyBiryukov
Message:

Transients: After [41963], add missing cron task for delete_expired_transients().

Props dlh.
Fixes #41699.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin.php

    r39941 r42008  
    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
     
    9499
    95100wp_enqueue_script( 'common' );
    96 
    97 
    98 
    99101
    100102/**
  • trunk/src/wp-includes/option.php

    r41963 r42008  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.