BP_Email_Tokens:: token__group_card (BP_Email$bp_电子邮件,数组formatted_tokens美元,数组美元的符号)
生成令牌组。card的输出
描述
参数
- $bp_电子邮件
-
(BP_Email)(必需)
- formatted_tokens美元
-
(数组)(必需)
- 美元的符号
-
(数组)(必需)
回来
(字符串)输出的HTML
源
文件:bp-core /类/ class-bp-email-tokens.php
公共功能令牌组令牌卡($bp_email,$formatted_tokens,$tokens){$output=';$group=isset($tokens['group'])?$tokens['group']:false;if(empty($group)){$group_id=isset($tokens['group.id'])?$tokens['group.id']:false;if(empty($group_id)){返回$output;}$group=groups取得组($group_id);}if(empty)($group)){return$output;}ob_start();?>'groups','item\u id'=>$group\u id,);echo“
”style=“border:1px纯色” ;显示:块;边框半径:3px;宽度:100px;“>$group->id,'avatar_dir'=>'组化身','object'=>'组','type'=>'满','width'=>200,'html'=>false));?>“width=“100”高度=“100”样式=“边距:0;填充:0;框大小:边框框;边框半径:3px;边框:3px实体<?php echo esc_attr($settings['body\u bg');?>;显示:block;“border=”0”/>
name;?>
activity->table\u name;$sql=array('select'=>“选择用户id,max(记录的日期)作为从{$activity\u table}记录的日期)“,”where'=>array(),”groupby'=>”GROUP BY user_id“,”orderby'=>”ORDER BY date_recorded“,”ORDER'=>”DESC“,);$sql['where']=array('item_id=')。absint($GROUP->id),$wpdb->prepare(“component=%s”,buddypress()->GROUP->id),);$sql['where'='where'。内爆('AND',$sql['where']);$sql['limit']='LIMIT 4';$group_user_ids=$wpdb->get_results(“{$sql['select']}{$sql['其中']}{$sql['groupby']}{$sql['order']}{$sql['order']}{$sql['LIMIT']}”);$group_user_ids=wp_list_pull($group_user_ids,'user_id')$output=“”;“foreach($user_用户id为$user_id){$avatar=bp\u core\u fetch\u avatar(数组('item\u id'=>$user\u id,'avatar\u dir'=>'avatars','object'=>'user','type'=>'full','html'=>false));if(!empty($avatar)){$output.=sprintf(,$avatar,bp\u core\u\u获取用户显示名($user\u id))}$output.=>.groups_-get_-total_-member_-count($group->id)。“.('Members','buddyboss')。”“echo$output;}?>” ”><?php$joined\u状态='unknown';$recipients=$bp\email->get\u-to();if(!empty($recipients)&&count recipients)==1{//BP_Email_recepient=reset($recepients);$user=$recepient->get_user();if(!empty($user)){if(groups_是_user_成员($user->ID,$group->ID)){$joined_status='joined'.}否则{$joined_status='not joined'.}}开关($joined_status){case'joined'.'joined'.'case:'Leave group','buddyboss;break;case'notjoined':\u e('Join Group','buddyboss');break;default:'u e('Visit Group','buddyboss');break;}?> 更新日志
更新日志 版本 描述 BuddyBoss 1.0.0 介绍了。 问题吗?