• Resolved delbot

    (@delbot)


    RE: the disable the auto delete features,

    adding this code to your theme/functions.php file

    remove_action(‘template_redirect’,’dnd_cf7_auto_clean_dir’, 30);

    Checked this and is not working..

    (posted in another part of support forum)

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter delbot

    (@delbot)

    remove_action('template_redirect', 'dnd_cf7_auto_clean_dir', 30);

    oop extra space missing there

    Thread Starter delbot

    (@delbot)

    Tried also

      add_action( 'plugins_loaded', 'remove_action_auto_delete_files', 30, 1 );
    function remove_action_auto_delete_files() {
    	remove_action( 'template_redirect', 'dnd_cf7_auto_clean_dir', 10 );
    }
    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hello @delbot ,

    I just check the remove action but It seems like It didn’t working I’m not sure why, but for now you can add filter and increase time length. (1 Year, 2 Years etc)

    add_filter('dnd_cf7_auto_delete_files', 'change_auto_deletion_time', 10, 1);
    	function change_auto_deletion_time( $time ) {
    		$time = (31536000 * 10); 
    		return $time;
    	}	

    Try the snippet above, files will be deleted after 10 Years, you can adjust the time accordingly.

    Thread Starter delbot

    (@delbot)

    Hi glen,

    Thank you for your response, will try on my end
    and report back

    Thread Starter delbot

    (@delbot)

    Hi Glen,

    will get back to you this monday – with an update…

    appears fine at this stage, but monday better day to test..

    delbot

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks @delbot , just let me know so we can close this thread.

    Thread Starter delbot

    (@delbot)

    Hi Glen,

    Tested this today,
    Can confirm your above code fix is working as per my setup:
    via child theme functions.phpfile
    (which is a normal one – nothing fancy – and within the guidelines
    and hosting via bluehost)

    thanks for all your help + and for a great plugin

    other support request – this fix should update to (may be others):

    file-gets-deleted-automatically-next-day

    file-gets-deleted-automatically

    delbot

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘disable the auto delete’ is closed to new replies.