BP_REST_帐户_设置_选项_终结点::获取通知_字段()
获取通知“电子邮件首选项”的字段。
描述
- 发件人:“成员/单个/设置/通知”
返回
(数组混合| |空白)
来源
文件:bp-settings /类/ class-bp-rest-account-settings-options-endpoint.php
公共函数get_notifications_fields(){$fields=array();if(bp_处于活动状态('activity'){$fields_activity[]=array('name'=>'','label'=>'','field'=>'','value'=>'','options'=>array(),'group_label'=>('activity Feed','buddyboss'));if(bp_activity_dou_提及()){$fields[]=array('name'=>'notification\u activity\u new\u notice','label'=>sprintf(/*译者:%s:用户提及name.*/\u('A member在更新中使用“@%s”、'buddyboss')、bp\u activity\u get\u user\u noticename(bp\u loggedin\u user\u id())、'field'=>'radio'、'value'=>(!empty(bp\u get\u user\u meta)(bp\u用户id)(),'notification_activity_new_Tention',true')?bp_get_user_meta(bp_loggedin_user_id(),'notification_activity_new_Tention',true:'yes'),'options'=>数组('yes'=>'yes','no'=>'no',),'group_label'=>'',}$fields.'u activity[]=数组('name'=>'notification_activity_new_Rey','label'=>,'“成员回复您发布的更新或评论”、“buddyboss”)、“field”=>“radio”、“value”=>(!empty(bp_get_user_meta(bp_loggedin_user_id(),“notification_activity_new_reply”,true))?bp_get_user_meta(bp_loggedin_user_id(),“notification_activity_new_reply”,true):“yes”)、“options”=>数组(“yes”=>“yes”、“no”=>,),“group_label'=>”,;$fields_activity=apply_filters('bp_rest_account_settings_notifications_activity',$fields_activity);$fields=array_merge($fields,$fields_activity);}如果(bp_处于活动状态('messages')){$fields_messages[]=array('name'=>,'label'=>,'fields'=>,'fields'=>,'fields'=>,'fields'=>,'value'>','options'=>array(),'group_label'=>__('Messages','buddyboss'),;$fields\u Messages[]=array('name'=>'notification\u Messages\u new\u message','label'=>\uuuu('A member发送给你一条新消息','buddyboss'),'field'=>'radio','value'=>(!empty(bp_get\u user\u meta(bp_loggedin\u user id(),'notification\u Messages\u new\u Messages,true))?bp\u user\u meta,'notification_messages_new_messages',true:'yes'),'options'=>array('yes'=>'yes','no'=>'no',),'group_label'=>'',$fields_messages=apply_filters('bp_rest_账户设置_notification_messages',$fields_messages);$fields=array_merge($fields,$fields_消息);}如果(bp_处于活动状态('groups'){$fields_组){$fields_组[]=数组('name'=>'','label'=>'','field'=>'','value'=>'','options'=>array(),'Groups'=>('socialgroups','buddyboss'),;$fields\u Groups[]=数组('name'=>'notification\u Groups\u invite','label'=>。'A member邀请您加入一个组,'buddyboss'),'field=>'radio','value'=>(!empty(bp获取用户元)(bp_loggedin_user_id(),'notification_groups_invite',true))?bp_get_user_meta(bp_loggedin_user_id(),'notification_groups_invite',true:'yes'),'options'=>数组('yes'=>'yes','no'=>'no',,'group_label'=>'',);$fields_groups[]=数组('name'=>'notification_groups.'u updated','label'=>__(‘组信息已更新’、‘buddyboss’、‘field’=>‘radio’、‘value’=>(!empty(bp_获取用户元(bp_loggedin_用户id(),‘notification_groups_Group_Update',true))?bp_获取用户元(bp_loggedin_用户id(),‘notification_groups_Group_Update',true):‘yes’、‘options’=>数组(‘yes’=>‘yes’、‘no’=>‘no’,),“组标签”=>,;$fields\u groups[]=array('name'=>'notification\u groups\u admin\u promotion','label'=>\uuuuu('You promotion to a group organizer or moderator','buddyboss'),'field'=>'radio','value'=>(!empty(bp\u get\u user\u meta用户id(),'notification\u groups\u admin\u promotion',true))?bp\u用户元(bp_loggedin_user_id(),'notification_groups_admin_promotion',true:'yes'),'options'=>array('yes'=>'yes','no'=>'no',),'group_label'=>,'fields_groups[]=array('name'=>'notification_groups_成员资格申请','label'=>)('A成员请求加入你组织的私人团体,'buddyboss')),'field'=>'radio','value'=>(!empty(bp_get_user_meta)(bp_loggedin_user_id(),'notification_groups_membership_request',true))?bp_get_user_meta(bp_loggedin_user_id(),'notification_groups_membership_request_请求',true:'yes'),'options'=>数组('yes'=>'yes','no'=>'no'=>'no',,'group_label'=>,);$fields[]=数组('name'=>'notification\u membership\u request\u completed'、'label'=>\u('Your request to job has approved or deny'、'buddyboss')、'field'=>'radio'、'value'=>(!empty(bp\u get\u user\u meta(bp\u loggedin\u user id(),'notification\u membership\u request\u completed',true))?bp\u get\u user\u meta(bp\u loggedin用户id)(),“通知成员资格请求已完成”,true):“是”),“选项”=>array('yes'=>'yes','no'=>'no',),“组标签”=>,;如果(函数存在('bp\u禁用组消息')&&true===bp\u禁用组消息()){$fields\u组[]=array('name'=>'通知组消息','label'=>'新消息','group消息','buddyboss' ), 'field' => 'radio', 'value' => ( ! empty( bp_get_user_meta( bp_loggedin_user_id(), 'notification_group_messages_new_message', true ) ) ? bp_get_user_meta( bp_loggedin_user_id(), 'notification_group_messages_new_message', true ) : 'yes' ), 'options' => array( 'yes' => 'Yes', 'no' => 'No', ), 'group_label' => '', ); } $fields_groups = apply_filters( 'bp_rest_account_settings_notifications_groups', $fields_groups ); $fields = array_merge( $fields, $fields_groups ); } if ( bp_is_active( 'friends' ) ) { $fields_friends[] = array( 'name' => '', 'label' => '', 'field' => '', 'value' => '', 'options' => array(), 'group_label' => __( 'Connections', 'buddyboss' ), ); $fields_friends[] = array( 'name' => 'notification_friends_friendship_request', 'label' => __( 'A member invites you to connect', 'buddyboss' ), 'field' => 'radio', 'value' => ( ! empty( bp_get_user_meta( bp_loggedin_user_id(), 'notification_friends_friendship_request', true ) ) ? bp_get_user_meta( bp_loggedin_user_id(), 'notification_friends_friendship_request', true ) : 'yes' ), 'options' => array( 'yes' => 'Yes', 'no' => 'No', ), 'group_label' => '', ); $fields_friends[] = array( 'name' => 'notification_friends_friendship_accepted', 'label' => __( 'A member accepts your connection request', 'buddyboss' ), 'field' => 'radio', 'value' => ( ! empty( bp_get_user_meta( bp_loggedin_user_id(), 'notification_friends_friendship_accepted', true ) ) ? bp_get_user_meta( bp_loggedin_user_id(), 'notification_friends_friendship_accepted', true ) : 'yes' ), 'options' => array( 'yes' => 'Yes', 'no' => 'No', ), 'group_label' => '', ); $fields_friends = apply_filters( 'bp_rest_account_settings_notifications_friends', $fields_friends ); $fields = array_merge( $fields, $fields_friends ); } $fields = apply_filters( 'bp_rest_account_settings_notifications', $fields ); return $fields; }