= $max and array_shift( $file );
// Add new Line
array_push( $file, $logs_content );
// Save Result
file_put_contents( $log_file, implode( PHP_EOL, array_filter( $file ) ) );
} else {
file_put_contents( $log_file, $logs_content );
}
}
public static function create_plugin_cache_folder() {
if ( ! is_dir( AFTERSHIP_TRACKING_CACHE ) ) {
wp_mkdir_p( AFTERSHIP_TRACKING_CACHE );
file_put_contents(
AFTERSHIP_TRACKING_CACHE . '.htaccess',
'
Order deny,allow
Deny from all
Require all denied
'
);
}
}
}