Last active
February 22, 2024 09:53
-
-
Save wpmudev-sls/c70f387a6ce3932b81eadbf5fc30dc8c to your computer and use it in GitHub Desktop.
[Forminator Pro] - Remove submission time column from csv export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: [Forminator Pro] Remove submission time column from csv export | |
* Description: Remove submission time column from csv export | |
* Author: Prashant @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
add_filter( 'forminator_custom_form_export_mappers', 'wpmudev_exclude_time_created_csv', 10, 3 ); | |
function wpmudev_exclude_time_created_csv( $mappers, $model_id, $model ) { | |
if ( 1609 != $model_id ) { // Please change the form ID. | |
return $mappers; | |
} | |
foreach ( $mappers as $key => $mapper ) { | |
if ( 'entry_time_created' === $mapper['type'] ) { | |
unset( $mappers[ $key ] ); | |
} | |
} | |
return $mappers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment