[wordpress插件] Blue Cube Email TemplatesBlue Cube电子邮件模板

wordpress 插件 文章 2020-03-07 23:00 421 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

This plugin is intended to be useful more for developers than other types of users.

与其他类型的用户相比,该插件旨在对开发人员更有用。

Have you ever had a client who likes to be able to independently update the content of the emails that your code is sending out programmatically?

您是否曾经有一个客户希望能够独立更新您的代码以编程方式发送的电子邮件的内容?

If so, this plugin might help you make your client happy.

如果是这样,此插件可能会帮助您使客户满意。

How to use:

使用方法:

When you activate the plugin, it adds a custom post type to your website called “Email Templates”.

激活插件后,它将在您的网站上添加一个自定义帖子类型,称为“电子邮件模板”。

You can create your templates using this custom post type.

您可以使用此自定义帖子类型创建模板。

Templates can contain placeholders for your code to fill them up with desired values.

模板可以包含占位符,以供您的代码填充所需的值。

A placeholder sample would be {USERNAME} or {USER_EMAIL}.

占位符示例为{USERNAME}或{USER_EMAIL}。

Please note, placeholders should not contain lowercase letters.

请注意,占位符不应包含小写字母。

This plugin creates a global instance of the BlueCube\Email_Template class which is called $bluecube_email_template.

此插件创建BlueCube \ Email_Template类的全局实例,该实例称为$ bluecube_email_template。

Once you have created a template, you can use the sendEmail() method of the instance to send out your emails.

创建模板后,可以使用实例的sendEmail()方法发送电子邮件。

$email_args = array(    

  $ email_args = array(    

'template_title' => 'your-template-title',    

'template_title'=>'您的模板标题',    

'to' => $email,    

'至'=> $ email,    

'variables' => array('username' => 'JohnDoe', 'user_email' => 'test@test.com'),

'变量'=>数组('用户名'=>'约翰杜德','用户电子邮件'=>'test@test.com'),

);

);

$bluecube_email_template->sendEmail($email_args);

$ bluecube_email_template-> sendEmail($ email_args);

安装步骤

Download and unzip the plugin.

下载并解压缩该插件。

Then upload the "bluecube-email-templates" folder to the /wp-content/plugins/ directory (or the relevant directory if your WordPress file structre is different), or

然后将“ bluecube-email-templates” 文件夹上传到 / wp-content / plugins / 目录(如果您的WordPress文件结构不同,则上传到相关目录),或者

you can simply install it using WordPress plugin installer.

您只需使用WordPress插件安装程序进行安装即可。

下载地址
https://downloads.wordpress.org/plugin/bluecube-email-templates.1.0.zip
-EOF-

AI助手支持GPT4.0