pfeifferNet

Email_New_Content extends System_Email
in package

Send recent posts update email.

Tags
since
5.9.0
uses
System_Email

Table of Contents

Constants

CONTENT  = 'email-new-post-content.php'
Email content filename.
CONTENT_INTRO  = 'email-new-post-intro.php'
Email intro text template.

Properties

$content  : string
Fully qualified path to the email content partial.
$content_intro  : string
The fully qualified path to the email intro partial.
$instances  : array<string|int, object>
The array of instances of this class and sub-classes.
$mail_args  : array<string|int, mixed>
The array of arguments for the email.

Methods

get_instance()  : object
Creates and/or returns the instance of this class.
is_send()  : bool
Filter and set the send email flag.
send()  : int
Send notification of recent posts.
__construct()  : void
Initialise the class and set its properties.
get_body()  : void
Get the markup for the recent posts body.

Constants

CONTENT

Email content filename.

protected string CONTENT = 'email-new-post-content.php'
Tags
since
5.9.0

CONTENT_INTRO

Email intro text template.

protected string CONTENT_INTRO = 'email-new-post-intro.php'
Tags
since
5.9.0

Properties

$content

Fully qualified path to the email content partial.

protected string $content = ''
Tags
since
5.9.0

$content_intro

The fully qualified path to the email intro partial.

protected string $content_intro
Tags
since
5.5.0

$instances

The array of instances of this class and sub-classes.

protected static array<string|int, object> $instances = array()
Tags
since
5.11.0

$mail_args

The array of arguments for the email.

protected array<string|int, mixed> $mail_args = array('to' => array(), 'cc' => array(), 'bcc' => array(), 'subject' => '', 'body' => '', 'is_internal' => false)

{ The email arguments. @type string[] $to The email address(es) of the recipients of the email. @type string[] $cc Optional. The email address(es) of the cc recipients of the email. @type string[] $bcc Optional. The email address(es) of the bcc recipients of the email. * @type string $subject The subject of the email. @type string $body The email content. @type bool $is_internal Flag to indicate that eamil is internal and not intended for external users. }

Tags
since
5.9.0

Methods

get_instance()

Creates and/or returns the instance of this class.

public static get_instance() : object
Tags
since
5.11.0
Return values
object

The instance of this class.

is_send()

Filter and set the send email flag.

public is_send(array<string|int, mixed> ...$args) : bool
Parameters
$args : array<string|int, mixed>

A variable set of arguments.

Tags
since
5.9.0
Return values
bool

The send email flag.

send()

Send notification of recent posts.

public send(array<string|int, mixed> $post_list, array<string|int, mixed> $recipients) : int
Parameters
$post_list : array<string|int, mixed>

An array of WP_Post objects.

$recipients : array<string|int, mixed>

An array of WP_User objects.

Tags
since
5.9.0
uses
HTML_Email::send()
used-by
Users::subscriber_email_update()
Return values
int

The number of emails sent.

__construct()

Initialise the class and set its properties.

protected __construct() : void
Tags
since
5.5.0

get_body()

Get the markup for the recent posts body.

protected get_body(WP_Post $post_data) : void
Parameters
$post_data : WP_Post

WP_Post object of the post to email.

Tags
since
5.9.0

        
On this page

Search results