wp_register_media_personal_data_exporter() WordPress Function
The wp_register_media_personal_data_exporter() function allows you to register a personal data exporter for the media library. This function takes two arguments: 1. The name of the exporter 2. An array of options for the exporter The name of the exporter must be unique. The array of options must include a 'callback' key that points to the callback function for the exporter. This function is useful for exporting personal data from the media library. For example, you could use this function to export a list of all the files a user has uploaded to the media library.
wp_register_media_personal_data_exporter( array[] $exporters ) #
Registers the personal data exporter for media.
Parameters
- $exporters
(array[])(Required)An array of personal data exporters, keyed by their ID.
Return
(array[]) Updated array of personal data exporters.
Source
File: wp-includes/media.php
function wp_register_media_personal_data_exporter( $exporters ) { $exporters['wordpress-media'] = array( 'exporter_friendly_name' => __( 'WordPress Media' ), 'callback' => 'wp_media_personal_data_exporter', ); return $exporters; }
Expand full source codeCollapse full source codeView on TracView on GitHub