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.


Top ↑

Return

(array[]) Updated array of personal data exporters.


Top ↑

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;
}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More