Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix wp_scheduled_delete don’t work

Discussion in 'Misc WordPress Requests' started by uheist, Oct 19, 2017.

  1. uheist

    Guest

    wp_scheduled_delete don’t work, by uheist

    Hello,

    old trash files aren’t deleted.

    function wp_scheduled_delete()
    Line 4728 in the functions.php is:
    $posts_to_delete = $wpdb->get_results($wpdb->prepare(“SELECT post_id FROM $wpdb->postmeta WHERE meta_key = ‘_wp_trash_meta_time’ AND meta_value < ‘%d'”, $delete_timestamp), ARRAY_A);

    After Channging to:
    $posts_to_delete = $wpdb->get_results($wpdb->prepare(“SELECT post_id FROM $wpdb->postmeta WHERE meta_key = ‘_wp_trash_meta_time’ AND (meta_value *1) < %d “, $delete_timestamp), ARRAY_A);

    it works!

    Best regards from germany
    Ulli Heist
    [email removed]

    wp_scheduled_delete don’t work
     
    #1

Share This Page

Web Hosting