BP_Settings_Export:: process_data ($ user美元的页面保龄球email_address美元

导出成员配置文件设置。

描述

参数

$ user

(必需)

美元的页面

(必需)

email_address美元

保龄球(可选)

默认值:假

返回

(数组)

文件:bp-core / gdpr / class-bp-settings-export.php

Function process_data($user, $page, $email_address = false) {if (!$user || is_wp_error($user)) {return $this->response(array(), true);} $export_items = array();美元group_id =“bp_settings”;$group_label = __('Settings', 'buddyboss');美元item_id = " {$ this - > exporter_name} - {$ group_id}”;/** * Email Preferences */ $notification_settings = $this->get_notification_settings();数组$ notification_data = ();foreach ($notification_settings as $noti_key => $notification_label) {$value = bp_get_user_meta($user->ID, $noti_key, true);如果(空(美元值)| | '是的' = = =美元值){如果('是的' = = =美元值){$价值= __(‘是的’,‘buddyboss’); } else { $value = __( 'Yes (Default)', 'buddyboss' ); } } else { $value = __( 'No', 'buddyboss' ); } $notification_data[] = array( 'name' => $notification_label, 'value' => $value, ); } $notification_data = apply_filters( 'buddyboss_bp_gdpr_notification_settings_after_data_prepare', $notification_data, $user ); $export_items[] = array( 'group_id' => $group_id . '_notification', 'group_label' => __( 'Email Preferences', 'buddyboss' ), 'item_id' => 'bp_notification_settings', 'data' => $notification_data, ); $export_items = apply_filters( 'buddyboss_bp_gdpr_additional_settings', $export_items, $user ); $done = true; return $this->response( $export_items, $done ); }

更新日志

更新日志
版本 描述
BuddyBoss 1.0.0 介绍了。

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队