Description
Filters the default settings for WP-Members’ user export process.
Defaults:
$defaults = array( 'export' => 'all', 'filename' => 'wp-members-user-export-' . date( "Y-m-d" ) . '.csv', 'fields' => $export_fields, // (from wpmem_export_fields fitler) 'entity_decode' => false, 'date_format' => 'Y-m-d', // Use PHP date format 'required_caps' => 'list_users', // WP capability required to export 'export_fields' => '', // Deprecated 3.4.0, use 'fields' instead. 'exclude_fields' => '', // Deprecated 3.4.0, use the wpmem_export_fields filter hook instead. );
Parameters
$args
(array) (required) An array of any defaults being changed.
$tag
(string) (optional) The export being performed, default value: “default
“
Example
/** * This example sets the export function to decode HTML entities * in the export. */ add_filter( 'wpmem_export_args', 'my_export_args' ); function my_export_args( $args ) { $args['entity_decode'] = true; return $args; }
Changelog
- Introduced in version 2.9.7
- 3.4.0 Filters all defaults, then uses
wp_parse_args()
to fill missing defaults - 3.4.0 Added
$tag
parameter - 3.4.0 Deprecated
exclude_fields
(unset usingwpmem_export_fields
instead) - 3.4.0 Deprecated
export_fields
, usefields
instead
Source
wpmem_export_args
is located in includes/class-wp-members-user-export.php