bp_get_member_invites_wildcard_replace (美元的文本保龄球美元的电子邮件

动态地将令牌{{}}替换为适当的内容。

描述

参数

美元的文本

(必需)

美元的电子邮件

保龄球(可选)

默认值:假

返回

(字符串)

文件:bp-invites / bp-invites-functions.php

函数bp_get_member_invites_wildcard_replace($text, $email = false) {global $bp;$inviter_name = bp_core_get_user_displayname(bp_loggedin_user_id());$site_name = get_bloginfo('name');$ inviter_url = bp_loggedin_user_domain ();$email = urlencode($email);$accept_link = add_query_arg(array('bp- invitation' => 'accept-member-invitation', 'email' => $email,), bp_get_root_domain()。“/”。bp_get_signup_slug()。' / ');$accept_link = apply_filters('bp_member_invitation_accept_url', $accept_link); /** * @todo why are we using %% instead of {{ }} or {{{ }}}? * Also, why are we using all caps, also why aren't we using . as separators? */ $text = str_replace( '{{inviter.name}}', $inviter_name, $text ); $text = str_replace( '[{{{site.name}}}]', get_bloginfo('name'), $text ); $text = str_replace( '{{{site.url}}}', site_url(), $text ); $text = str_replace( '%%INVITERNAME%%', $inviter_name, $text ); $text = str_replace( '%%INVITERURL%%', $inviter_url, $text ); // @todo Don't we already have site.name above? $text = str_replace( '%%SITENAME%%', $site_name, $text ); $text = str_replace( '%%ACCEPTURL%%', $accept_link, $text ); /* Adding single % replacements because lots of people are making the mistake */ $text = str_replace( '%INVITERNAME%', $inviter_name, $text ); $text = str_replace( '%INVITERURL%', $inviter_url, $text ); $text = str_replace( '%SITENAME%', $site_name, $text ); $text = str_replace( '%ACCEPTURL%', $accept_link, $text ); return $text; }

更新日志

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

问题吗?

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