PHP Class Give_Email_Template_Tags, Give

ファイルを表示 Open project: wordimpress/give

Public Methods

Method Description
add ( string $tag, string $description, callable $func ) Add an email tag.
do_tag ( $m ) : mixed Do a specific tag, this function should not be used. Please use give_do_email_tags instead.
do_tags ( string $content, integer $payment_id ) : string Search content for email tags and filter email tags through their hooks.
email_tag_exists ( string $tag ) : boolean Check if $tag is a registered email tag.
get_tags ( ) : array Returns a list of all email tags
remove ( string $tag ) Remove an email tag.

Method Details

add() public method

Add an email tag.
Since: 1.0
public add ( string $tag, string $description, callable $func )
$tag string Email tag to be replace in email.
$description string The email tag description.
$func callable Hook to run when email tag is found.

do_tag() public method

Do a specific tag, this function should not be used. Please use give_do_email_tags instead.
Since: 1.0
public do_tag ( $m ) : mixed
$m message
return mixed

do_tags() public method

Search content for email tags and filter email tags through their hooks.
Since: 1.0
public do_tags ( string $content, integer $payment_id ) : string
$content string Content to search for email tags.
$payment_id integer The payment id.
return string Content with email tags filtered out.

email_tag_exists() public method

Check if $tag is a registered email tag.
Since: 1.0
public email_tag_exists ( string $tag ) : boolean
$tag string Email tag that will be searched.
return boolean

get_tags() public method

Returns a list of all email tags
Since: 1.0
public get_tags ( ) : array
return array

remove() public method

Remove an email tag.
Since: 1.0
public remove ( string $tag )
$tag string Email tag to remove hook from