PHP Class Give_Emails, Give

Since: 1.0
显示文件 Open project: wordimpress/give Class Usage Examples

Public Methods

Method Description
__construct ( ) Get things going
__set ( $key, $value ) Set a property
build_email ( $message ) : mixed | void Build the final email.
get_content_type ( ) Get the email content type
get_from_address ( ) Get the email from address
get_from_name ( ) Get the email from name
get_headers ( ) Get the email headers
get_heading ( ) Get the header text for the email
get_template ( ) Get the enabled email template
get_templates ( ) Retrieve email templates
parse_tags ( $content ) : mixed Parse email template tags
send ( string $to, string $subject, string $message, string | array $attachments = '' ) : boolean Send the email
send_after ( ) Remove filters / actions after the email is sent
send_before ( ) Add filters / actions before the email is sent
text_to_html ( $message ) Converts text to formatted HTML. This is primarily for turning line breaks into

and
tags.

Method Details

__construct() public method

Get things going
Since: 1.0
public __construct ( )

__set() public method

Set a property
Since: 1.0
public __set ( $key, $value )

build_email() public method

Build the final email.
Since: 1.0
public build_email ( $message ) : mixed | void
$message
return mixed | void

get_content_type() public method

Get the email content type
Since: 1.0
public get_content_type ( )

get_from_address() public method

Get the email from address
Since: 1.0
public get_from_address ( )

get_from_name() public method

Get the email from name
Since: 1.0
public get_from_name ( )

get_headers() public method

Get the email headers
Since: 1.0
public get_headers ( )

get_heading() public method

Get the header text for the email
Since: 1.0
public get_heading ( )

get_template() public method

Get the enabled email template
Since: 1.0
public get_template ( )

get_templates() public method

Retrieve email templates
Since: 1.0
public get_templates ( )

parse_tags() public method

Parse email template tags
public parse_tags ( $content ) : mixed
$content
return mixed

send() public method

Send the email
public send ( string $to, string $subject, string $message, string | array $attachments = '' ) : boolean
$to string The To address to send to.
$subject string The subject line of the email to send.
$message string The body of the email to send.
$attachments string | array Attachments to the email in a format supported by wp_mail()
return boolean

send_after() public method

Remove filters / actions after the email is sent
Since: 1.0
public send_after ( )

send_before() public method

Add filters / actions before the email is sent
Since: 1.0
public send_before ( )

text_to_html() public method

Converts text to formatted HTML. This is primarily for turning line breaks into

and
tags.

Since: 1.0
public text_to_html ( $message )