CustomerNewAccount
extends WC_Email
in package
Customer New Account.
An email sent to the customer when they create an account. This is intended as a replacement to \WC_Email_Customer_New_Account(), with a set password link instead of emailing the new password in email content.
Tags
Table of Contents
- $default_template_path : string
- Override (force) default template path
- $description : string
- Description for the email.
- $email_type : string
- E-mail type: plain, html or multipart.
- $enabled : string
- 'yes' if the method is enabled.
- $errors : array<string|int, mixed>
- Validation errors.
- $find : array<string|int, mixed>
- Strings to find in subjects/headings.
- $form_fields : array<string|int, mixed>
- Form option fields.
- $heading : string
- Default heading.
- $id : string
- ID of the class extending the settings API. Used in option names.
- $mime_boundary : string
- Mime boundary (for multipart emails).
- $mime_boundary_header : string
- Mime boundary header (for multipart emails).
- $object : object|bool
- Object this email is for, for example a customer, product, or email.
- $plain_replace : mixed
- List of pattern replacements corresponding to patterns searched.
- $plain_search : array<string|int, mixed>
- List of preg* regular expression patterns to search for, used in conjunction with $plain_replace.
- $plugin_id : string
- The plugin ID. Used for option names.
- $recipient : string
- Recipients for the email.
- $replace : array<string|int, mixed>
- Strings to replace in subjects/headings.
- $sending : bool
- True when email is being sent.
- $set_password_url : string
- Magic link to set initial password.
- $settings : array<string|int, mixed>
- Setting values.
- $subject : string
- Default subject.
- $template_base : string
- Template path.
- $template_html : string
- HTML template path.
- $template_plain : string
- Plain text template path.
- $title : string
- Email method title.
- $user_email : string
- User email.
- $user_login : string
- User login name.
- $customer_email : bool
- True when the email notification is sent to customers.
- $data : array<string|int, mixed>
- The posted settings data. When empty, $_POST data will be used.
- $manual : bool
- True when the email notification is sent manually only.
- $placeholders : array<string|int, mixed>
- Strings to find/replace in subjects/headings.
- __construct() : mixed
- Constructor.
- add_error() : mixed
- Add an error message for display in admin on save.
- admin_options() : mixed
- Output the admin options table.
- display_errors() : mixed
- Display admin error messages.
- format_settings() : array<string|int, mixed>
- Format settings if needed.
- format_string() : string
- Format email string.
- generate_checkbox_html() : string
- Generate Checkbox HTML.
- generate_color_html() : string
- Generate Color Picker Input HTML.
- generate_decimal_html() : string
- Generate Decimal Input HTML.
- generate_multiselect_html() : string
- Generate Multiselect HTML.
- generate_password_html() : string
- Generate Password Input HTML.
- generate_price_html() : string
- Generate Price Input HTML.
- generate_safe_text_html() : string
- Generates HTML for the 'safe_text' input type (mostly used for gateway-related settings).
- generate_select_html() : string
- Generate Select HTML.
- generate_settings_html() : string
- Generate Settings HTML.
- generate_text_html() : string
- Generate Text Input HTML.
- generate_textarea_html() : string
- Generate Textarea HTML.
- generate_title_html() : string
- Generate Title HTML.
- get_additional_content() : string
- Return content from the additional_content field.
- get_attachments() : array<string|int, mixed>
- Get email attachments.
- get_blogname() : string
- Get WordPress blog name.
- get_content() : string
- Get email content.
- get_content_html() : string
- Get content html.
- get_content_plain() : string
- Get content plain.
- get_content_type() : string
- Get email content type.
- get_custom_attribute_html() : string
- Get custom attributes.
- get_default_additional_content() : string
- Default content to show below main email content.
- get_default_heading() : string
- Get email heading.
- get_default_subject() : string
- Get email subject.
- get_description() : string
- Return the email's description
- get_description_html() : string
- Get HTML for descriptions.
- get_email_type() : string
- Return email type.
- get_email_type_options() : array<string|int, mixed>
- Email type options.
- get_errors() : mixed
- Get admin error messages.
- get_field_default() : string
- Get a fields default value. Defaults to "" if not set.
- get_field_key() : string
- Prefix key for settings.
- get_field_type() : string
- Get a fields type. Defaults to "text" if not set.
- get_field_value() : string
- Get a field's posted and validated value.
- get_form_fields() : array<string|int, mixed>
- Get the form fields after they are initialized.
- get_from_address() : string
- Get the from address for outgoing emails.
- get_from_name() : string
- Get the from name for outgoing emails.
- get_headers() : string
- Get email headers.
- get_heading() : string
- Get email heading.
- get_option() : string
- Get option from DB.
- get_option_key() : string
- Return the name of the option in the WP DB.
- get_post_data() : array<string|int, mixed>
- Returns the POSTed data, to be used to save the settings.
- get_recipient() : string
- Get valid recipients.
- get_subject() : string
- Get email subject.
- get_template() : string
- Get template.
- get_theme_template_file() : string
- Get the template file in the current theme.
- get_title() : string
- Return the email's title
- get_tooltip_html() : string
- Get HTML for tooltips.
- handle_multipart() : PHPMailer
- Handle multipart mail.
- init_form_fields() : mixed
- Initialise settings form fields.
- init_settings() : mixed
- Initialise Settings.
- is_customer_email() : bool
- Checks if this email is customer focussed.
- is_enabled() : bool
- Checks if this email is enabled and will be sent.
- is_manual() : bool
- Checks if this email is manually sent
- process_admin_options() : bool
- Processes and saves options.
- restore_locale() : mixed
- Restore the locale to the default locale. Use after finished with setup_locale.
- send() : bool
- Send an email.
- set_post_data() : mixed
- Sets the POSTed data. This method can be used to set specific data, instead of taking it from the $_POST array.
- setup_locale() : mixed
- Set the locale to the store locale for customer emails to make sure emails are in the store language.
- style_inline() : string
- Apply inline styles to dynamic content.
- trigger() : mixed
- Trigger.
- update_option() : bool
- Update a single option.
- validate_checkbox_field() : string
- Validate Checkbox Field.
- validate_decimal_field() : string
- Validate Decimal Field.
- validate_multiselect_field() : string|array<string|int, mixed>
- Validate Multiselect Field.
- validate_password_field() : string
- Validate Password Field. No input sanitization is used to avoid corrupting passwords.
- validate_price_field() : string
- Validate Price Field.
- validate_safe_text_field() : string
- Sanitize 'Safe Text' fields.
- validate_select_field() : string
- Validate Select Field.
- validate_settings_fields() : mixed
- Validate the data on the "Settings" form.
- validate_text_field() : string
- Validate Text Field.
- validate_textarea_field() : string
- Validate Textarea Field.
- admin_actions() : mixed
- Admin actions.
- delete_template_action() : mixed
- Delete template action.
- get_must_use_css_styles() : string
- Returns CSS styles that should be included with all HTML e-mails, regardless of theme specific customizations.
- move_template_action() : mixed
- Move template action.
- save_template() : mixed
- Save the email templates.
- set_defaults() : array<string|int, mixed>
- Set default required properties for each field.
- supports_emogrifier() : bool
- Return if emogrifier library is supported.
- clear_alt_body_field() : void
- Clears the PhpMailer AltBody field, to prevent that content from leaking across emails.
Properties
$default_template_path
Override (force) default template path
public
string
$default_template_path
$description
Description for the email.
public
string
$description
$email_type
E-mail type: plain, html or multipart.
public
string
$email_type
$enabled
'yes' if the method is enabled.
public
string
$enabled
$errors
Validation errors.
public
array<string|int, mixed>
$errors
= array()
$find
Strings to find in subjects/headings.
public
array<string|int, mixed>
$find
= array()
Tags
$form_fields
Form option fields.
public
array<string|int, mixed>
$form_fields
= array()
$heading
Default heading.
public
string
$heading
= ''
Supported for backwards compatibility but we recommend overloading the get_default_x methods instead so localization can be done when needed.
$id
ID of the class extending the settings API. Used in option names.
public
string
$id
= ''
$mime_boundary
Mime boundary (for multipart emails).
public
string
$mime_boundary
$mime_boundary_header
Mime boundary header (for multipart emails).
public
string
$mime_boundary_header
$object
Object this email is for, for example a customer, product, or email.
public
object|bool
$object
$plain_replace
List of pattern replacements corresponding to patterns searched.
public
mixed
$plain_replace
= array(
'',
// Non-legal carriage return.
' ',
// Non-breaking space.
'"',
// Double quotes.
"'",
// Single quotes.
'>',
// Greater-than.
'<',
// Less-than.
'&',
// Ampersand.
'&',
// Ampersand.
'(c)',
// Copyright.
'(tm)',
// Trademark.
'(R)',
// Registered.
'--',
// mdash.
'-',
// ndash.
'*',
// Bullet.
'£',
// Pound sign.
'EUR',
// Euro sign. € ?.
'$',
// Dollar sign.
'',
// Unknown/unhandled entities.
' ',
)
@var array $plain_replace
Tags
$plain_search
List of preg* regular expression patterns to search for, used in conjunction with $plain_replace.
public
array<string|int, mixed>
$plain_search
= array(
"/
/",
// Non-legal carriage return.
'/&(nbsp|#0*160);/i',
// Non-breaking space.
'/&(quot|rdquo|ldquo|#0*8220|#0*8221|#0*147|#0*148);/i',
// Double quotes.
'/&(apos|rsquo|lsquo|#0*8216|#0*8217);/i',
// Single quotes.
'/>/i',
// Greater-than.
'/</i',
// Less-than.
'/�*38;/i',
// Ampersand.
'/&/i',
// Ampersand.
'/&(copy|#0*169);/i',
// Copyright.
'/&(trade|#0*8482|#0*153);/i',
// Trademark.
'/&(reg|#0*174);/i',
// Registered.
'/&(mdash|#0*151|#0*8212);/i',
// mdash.
'/&(ndash|minus|#0*8211|#0*8722);/i',
// ndash.
'/&(bull|#0*149|#0*8226);/i',
// Bullet.
'/&(pound|#0*163);/i',
// Pound sign.
'/&(euro|#0*8364);/i',
// Euro sign.
'/&(dollar|#0*36);/i',
// Dollar sign.
'/&[^&\s;]+;/i',
// Unknown/unhandled entities.
'/[ ]{2,}/',
)
https://raw.github.com/ushahidi/wp-silcc/master/class.html2text.inc
$plugin_id
The plugin ID. Used for option names.
public
string
$plugin_id
= 'woocommerce_'
$recipient
Recipients for the email.
public
string
$recipient
$replace
Strings to replace in subjects/headings.
public
array<string|int, mixed>
$replace
= array()
Tags
$sending
True when email is being sent.
public
bool
$sending
$set_password_url
Magic link to set initial password.
public
string
$set_password_url
$settings
Setting values.
public
array<string|int, mixed>
$settings
= array()
$subject
Default subject.
public
string
$subject
= ''
Supported for backwards compatibility but we recommend overloading the get_default_x methods instead so localization can be done when needed.
$template_base
Template path.
public
string
$template_base
$template_html
HTML template path.
public
string
$template_html
$template_plain
Plain text template path.
public
string
$template_plain
$title
Email method title.
public
string
$title
$user_email
User email.
public
string
$user_email
$user_login
User login name.
public
string
$user_login
$customer_email
True when the email notification is sent to customers.
protected
bool
$customer_email
= alse
$data
The posted settings data. When empty, $_POST data will be used.
protected
array<string|int, mixed>
$data
= array()
$manual
True when the email notification is sent manually only.
protected
bool
$manual
= alse
$placeholders
Strings to find/replace in subjects/headings.
protected
array<string|int, mixed>
$placeholders
= array()
Methods
__construct()
Constructor.
public
__construct(Package $package) : mixed
Parameters
- $package : Package
-
An instance of (Woo Blocks) Package.
Return values
mixed —add_error()
Add an error message for display in admin on save.
public
add_error(string $error) : mixed
Parameters
- $error : string
-
Error message.
Return values
mixed —admin_options()
Output the admin options table.
public
admin_options() : mixed
Return values
mixed —display_errors()
Display admin error messages.
public
display_errors() : mixed
Return values
mixed —format_settings()
Format settings if needed.
public
format_settings(array<string|int, mixed> $value) : array<string|int, mixed>
Parameters
- $value : array<string|int, mixed>
-
Value to format.
Tags
Return values
array<string|int, mixed> —format_string()
Format email string.
public
format_string(mixed $string) : string
Parameters
- $string : mixed
-
Text to replace placeholders in.
Return values
string —generate_checkbox_html()
Generate Checkbox HTML.
public
generate_checkbox_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_color_html()
Generate Color Picker Input HTML.
public
generate_color_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_decimal_html()
Generate Decimal Input HTML.
public
generate_decimal_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_multiselect_html()
Generate Multiselect HTML.
public
generate_multiselect_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_password_html()
Generate Password Input HTML.
public
generate_password_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_price_html()
Generate Price Input HTML.
public
generate_price_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_safe_text_html()
Generates HTML for the 'safe_text' input type (mostly used for gateway-related settings).
public
generate_safe_text_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_select_html()
Generate Select HTML.
public
generate_select_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_settings_html()
Generate Settings HTML.
public
generate_settings_html([array<string|int, mixed> $form_fields = array() ][, bool $echo = true ]) : string
Generate the HTML for the fields on the "settings" screen.
Parameters
- $form_fields : array<string|int, mixed> = array()
-
(default: array()) Array of form fields.
- $echo : bool = true
-
Echo or return.
Tags
Return values
string — the html for the settingsgenerate_text_html()
Generate Text Input HTML.
public
generate_text_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_textarea_html()
Generate Textarea HTML.
public
generate_textarea_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —generate_title_html()
Generate Title HTML.
public
generate_title_html(string $key, array<string|int, mixed> $data) : string
Parameters
- $key : string
-
Field key.
- $data : array<string|int, mixed>
-
Field data.
Tags
Return values
string —get_additional_content()
Return content from the additional_content field.
public
get_additional_content() : string
Displayed above the footer.
Tags
Return values
string —get_attachments()
Get email attachments.
public
get_attachments() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_blogname()
Get WordPress blog name.
public
get_blogname() : string
Return values
string —get_content()
Get email content.
public
get_content() : string
Return values
string —get_content_html()
Get content html.
public
get_content_html() : string
Return values
string —get_content_plain()
Get content plain.
public
get_content_plain() : string
Return values
string —get_content_type()
Get email content type.
public
get_content_type([string $default_content_type = '' ]) : string
Parameters
- $default_content_type : string = ''
-
Default wp_mail() content type.
Return values
string —get_custom_attribute_html()
Get custom attributes.
public
get_custom_attribute_html(array<string|int, mixed> $data) : string
Parameters
- $data : array<string|int, mixed>
-
Field data.
Return values
string —get_default_additional_content()
Default content to show below main email content.
public
get_default_additional_content() : string
Tags
Return values
string —get_default_heading()
Get email heading.
public
get_default_heading() : string
Tags
Return values
string —get_default_subject()
Get email subject.
public
get_default_subject() : string
Tags
Return values
string —get_description()
Return the email's description
public
get_description() : string
Return values
string —get_description_html()
Get HTML for descriptions.
public
get_description_html(array<string|int, mixed> $data) : string
Parameters
- $data : array<string|int, mixed>
-
Data for the description.
Return values
string —get_email_type()
Return email type.
public
get_email_type() : string
Return values
string —get_email_type_options()
Email type options.
public
get_email_type_options() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_errors()
Get admin error messages.
public
get_errors() : mixed
Return values
mixed —get_field_default()
Get a fields default value. Defaults to "" if not set.
public
get_field_default(array<string|int, mixed> $field) : string
Parameters
- $field : array<string|int, mixed>
-
Field key.
Return values
string —get_field_key()
Prefix key for settings.
public
get_field_key(string $key) : string
Parameters
- $key : string
-
Field key.
Return values
string —get_field_type()
Get a fields type. Defaults to "text" if not set.
public
get_field_type(array<string|int, mixed> $field) : string
Parameters
- $field : array<string|int, mixed>
-
Field key.
Return values
string —get_field_value()
Get a field's posted and validated value.
public
get_field_value(string $key, array<string|int, mixed> $field[, array<string|int, mixed> $post_data = array() ]) : string
Parameters
- $key : string
-
Field key.
- $field : array<string|int, mixed>
-
Field array.
- $post_data : array<string|int, mixed> = array()
-
Posted data.
Return values
string —get_form_fields()
Get the form fields after they are initialized.
public
get_form_fields() : array<string|int, mixed>
Return values
array<string|int, mixed> — of optionsget_from_address()
Get the from address for outgoing emails.
public
get_from_address([string $from_email = '' ]) : string
Parameters
- $from_email : string = ''
-
Default wp_mail() email address to send from.
Return values
string —get_from_name()
Get the from name for outgoing emails.
public
get_from_name([string $from_name = '' ]) : string
Parameters
- $from_name : string = ''
-
Default wp_mail() name associated with the "from" email address.
Return values
string —get_headers()
Get email headers.
public
get_headers() : string
Return values
string —get_heading()
Get email heading.
public
get_heading() : string
Return values
string —get_option()
Get option from DB.
public
get_option(string $key[, mixed $empty_value = null ]) : string
Gets an option from the settings API, using defaults if necessary to prevent undefined notices.
Parameters
- $key : string
-
Option key.
- $empty_value : mixed = null
-
Value when empty.
Return values
string — The value specified for the option or a default value for the option.get_option_key()
Return the name of the option in the WP DB.
public
get_option_key() : string
Tags
Return values
string —get_post_data()
Returns the POSTed data, to be used to save the settings.
public
get_post_data() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_recipient()
Get valid recipients.
public
get_recipient() : string
Return values
string —get_subject()
Get email subject.
public
get_subject() : string
Return values
string —get_template()
Get template.
public
get_template(string $type) : string
Parameters
- $type : string
-
Template type. Can be either 'template_html' or 'template_plain'.
Return values
string —get_theme_template_file()
Get the template file in the current theme.
public
get_theme_template_file(string $template) : string
Parameters
- $template : string
-
Template name.
Return values
string —get_title()
Return the email's title
public
get_title() : string
Return values
string —get_tooltip_html()
Get HTML for tooltips.
public
get_tooltip_html(array<string|int, mixed> $data) : string
Parameters
- $data : array<string|int, mixed>
-
Data for the tooltip.
Return values
string —handle_multipart()
Handle multipart mail.
public
handle_multipart(PHPMailer $mailer) : PHPMailer
Parameters
- $mailer : PHPMailer
-
PHPMailer object.
Return values
PHPMailer —init_form_fields()
Initialise settings form fields.
public
init_form_fields() : mixed
Add an array of fields to be displayed on the gateway's settings screen.
Tags
Return values
mixed —init_settings()
Initialise Settings.
public
init_settings() : mixed
Store all settings in a single database entry and make sure the $settings array is either the default or the settings stored in the database.
Tags
Return values
mixed —is_customer_email()
Checks if this email is customer focussed.
public
is_customer_email() : bool
Return values
bool —is_enabled()
Checks if this email is enabled and will be sent.
public
is_enabled() : bool
Return values
bool —is_manual()
Checks if this email is manually sent
public
is_manual() : bool
Return values
bool —process_admin_options()
Processes and saves options.
public
process_admin_options() : bool
If there is an error thrown, will continue to save and validate fields, but will leave the erroring field out.
Return values
bool — was anything saved?restore_locale()
Restore the locale to the default locale. Use after finished with setup_locale.
public
restore_locale() : mixed
Return values
mixed —send()
Send an email.
public
send(string $to, string $subject, string $message, string $headers, array<string|int, mixed> $attachments) : bool
Parameters
- $to : string
-
Email to.
- $subject : string
-
Email subject.
- $message : string
-
Email message.
- $headers : string
-
Email headers.
- $attachments : array<string|int, mixed>
-
Email attachments.
Return values
bool — successset_post_data()
Sets the POSTed data. This method can be used to set specific data, instead of taking it from the $_POST array.
public
set_post_data([array<string|int, mixed> $data = array() ]) : mixed
Parameters
- $data : array<string|int, mixed> = array()
-
Posted data.
Return values
mixed —setup_locale()
Set the locale to the store locale for customer emails to make sure emails are in the store language.
public
setup_locale() : mixed
Return values
mixed —style_inline()
Apply inline styles to dynamic content.
public
style_inline(string|null $content) : string
We only inline CSS for html emails, and to do so we use Emogrifier library (if supported).
Parameters
- $content : string|null
-
Content that will receive inline styles.
Tags
Return values
string —trigger()
Trigger.
public
trigger(int $user_id[, string $user_pass = '' ][, bool $password_generated = false ]) : mixed
Parameters
- $user_id : int
-
User ID.
- $user_pass : string = ''
-
User password.
- $password_generated : bool = false
-
Whether the password was generated automatically or not.
Return values
mixed —update_option()
Update a single option.
public
update_option(string $key[, mixed $value = '' ]) : bool
Parameters
- $key : string
-
Option key.
- $value : mixed = ''
-
Value to set.
Tags
Return values
bool — was anything saved?validate_checkbox_field()
Validate Checkbox Field.
public
validate_checkbox_field(string $key, string $value) : string
If not set, return "no", otherwise return "yes".
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_decimal_field()
Validate Decimal Field.
public
validate_decimal_field(string $key, string $value) : string
Make sure the data is escaped correctly, etc.
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_multiselect_field()
Validate Multiselect Field.
public
validate_multiselect_field(string $key, string $value) : string|array<string|int, mixed>
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string|array<string|int, mixed> —validate_password_field()
Validate Password Field. No input sanitization is used to avoid corrupting passwords.
public
validate_password_field(string $key, string $value) : string
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_price_field()
Validate Price Field.
public
validate_price_field(string $key, string $value) : string
Make sure the data is escaped correctly, etc.
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_safe_text_field()
Sanitize 'Safe Text' fields.
public
validate_safe_text_field(string $key, string $value) : string
These fields are similar to regular text fields, but a much smaller set of HTML tags are allowed. By default,
this means <br>
, <img>
, <p>
and <span>
tags.
Note: this is a sanitization method, rather than a validation method (the name is due to some historic naming choices).
Parameters
- $key : string
-
Field key (currently unused).
- $value : string
-
Posted Value.
Return values
string —validate_select_field()
Validate Select Field.
public
validate_select_field(string $key, string $value) : string
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_settings_fields()
Validate the data on the "Settings" form.
public
validate_settings_fields([array<string|int, mixed> $form_fields = array() ]) : mixed
Parameters
- $form_fields : array<string|int, mixed> = array()
-
Array of fields.
Tags
Return values
mixed —validate_text_field()
Validate Text Field.
public
validate_text_field(string $key, string $value) : string
Make sure the data is escaped correctly, etc.
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Return values
string —validate_textarea_field()
Validate Textarea Field.
public
validate_textarea_field(string $key, string $value) : string
Parameters
- $key : string
-
Field key.
- $value : string
-
Posted Value.
Tags
Return values
string —admin_actions()
Admin actions.
protected
admin_actions() : mixed
Return values
mixed —delete_template_action()
Delete template action.
protected
delete_template_action(string $template_type) : mixed
Parameters
- $template_type : string
-
Template type.
Return values
mixed —get_must_use_css_styles()
Returns CSS styles that should be included with all HTML e-mails, regardless of theme specific customizations.
protected
get_must_use_css_styles() : string
Tags
Return values
string —move_template_action()
Move template action.
protected
move_template_action(string $template_type) : mixed
Parameters
- $template_type : string
-
Template type.
Return values
mixed —save_template()
Save the email templates.
protected
save_template(string $template_code, string $template_path) : mixed
Parameters
- $template_code : string
-
Template code.
- $template_path : string
-
Template path.
Tags
Return values
mixed —set_defaults()
Set default required properties for each field.
protected
set_defaults(array<string|int, mixed> $field) : array<string|int, mixed>
Parameters
- $field : array<string|int, mixed>
-
Setting field array.
Return values
array<string|int, mixed> —supports_emogrifier()
Return if emogrifier library is supported.
protected
supports_emogrifier() : bool
Tags
Return values
bool —clear_alt_body_field()
Clears the PhpMailer AltBody field, to prevent that content from leaking across emails.
private
clear_alt_body_field() : void