wp_privacy_personal_data_exporters
云策文档标注
概述
wp_privacy_personal_data_exporters 是一个 WordPress 过滤器,用于管理个人数据导出器的回调函数数组。它允许开发者添加或修改导出器,以处理用户个人数据的导出请求。
关键要点
- 这是一个过滤器钩子,用于过滤个人数据导出器的回调数组。
- 参数包括一个数组,其中包含可调用的导出器函数,这些函数接受电子邮件地址和页码,并返回个人数据的键值对。
- 导出器需要提供用户友好的名称(exporter_friendly_name),以便在界面中显示。
- 在 WordPress 4.9.6 版本中引入。
代码示例
$exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() );注意事项
- 导出器回调函数必须遵循特定签名:接受电子邮件地址和页码参数,返回数组格式的个人数据。
- 此过滤器在多个核心函数中使用,如处理 AJAX 导出请求和显示导出步骤。
原文内容
Filters the array of exporter callbacks.
Parameters
$argsarray- An array of callable exporters of personal data. Default empty array.
...$0arrayArray of personal data exporters.callbackcallableCallable exporter function that accepts an email address and a page number and returns an array of name => value pairs of personal data.exporter_friendly_namestringTranslated user facing friendly name for the exporter.
Source
$exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() );Changelog
Version Description 4.9.6 Introduced.
User Contributed Notes
You must log in before being able to contribute a note or feedback.