Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author eskapism

    (@eskapism)

    There is a filter that you can use for that: simple_history/db_purge_days_interval.

    So if you would like to remove items older than 7 days you would do it like this:

    // Clear items that are older than a 7 days (i.e. keep only the most recent 7 days in the log)
    add_filter( "simple_history/db_purge_days_interval", function( $days ) {
    
    	$days = 7;
    
    	return $days;
    
    } );

    Hi,

    where should this filter be placed – function.php?

    Regards,

    Plugin Author eskapism

    (@eskapism)

    Yes, functions.php should do it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Option to delete after X days?’ is closed to new replies.