我使用自定义电子邮件提醒我,每当一个新的用户注册到我的wordpress会员网站。我目前能够在我的电子邮件中包含的短代码是:
[name] = Displays user name.
[username] = Displays user username.
[password] = Displays user password.
[first_name] = Displays user first name.
[last_name] = Displays user last name.
[email] = Displays the user email.
[admin_email] = Displays the admin email.
[blogname] = Displays the blog anme.
[siteurl] = Displays site url.
[loginurl] = Displayslogin url.
[login_url] = Displays login url.
[passwordlink] = Displays password reset link.
[reason] = Displays the reason.
[expire_date] = Displays user expire date.
[post_title] = Displays the purchase post title.
[purchase_cost] = Displays the purchase post cost.
[amount] = Displays the membership amount.
[currency_sign] = Displays the currency symbol.
[membership_type] = Displays the membership type.我想在电子邮件中包含以下wp_usermeta信息,以便为这些电子邮件设置另一个自定义的短代码:
_mgm_cf_show_details_in_member_directory我如何告诉wordpress在一个新的短代码中回显这些信息,就像成员目录一样。
注册后,用户输入是或否这个问题,所以我希望电子邮件警报告诉我,他们是否选择了是或否。
我希望这一切都有意义,再次感谢各位。
发布于 2014-10-13 16:08:12
不看代码,我不能给你一个明确的答案,但是;
它应该像为输出数组添加一个新的数组键一样简单。
在某个地方会有一些东西把短代码发送到电子邮件中,这将是一个对象,类似于:
$return['name'] = $user->name;你只需要添加这样的东西:
$return['member-directory'] = $user->_mgm_cf_show_details_in_member_directory 沿着这些路线的东西应该能把你带到那里
https://stackoverflow.com/questions/26242395
复制相似问题