Skip to content
Docs
Get RestroPress

Action

rpress_email_header

Updated
On this page

Fires after the email header template part has been loaded.

Runs in RPRESS_Emails::build_email() in HTML mode, immediately after the emails/header template part for the current template is included. Output printed here becomes part of the email, between the header and the body. It is followed by the body template and rpress_email_body.

Parameters#

ParameterTypeDescription
$emailsRPRESS_EmailsThe RPRESS_Emails instance sending the email.

Example#

function my_email_header( $emails ) {
	echo '<p style="text-align:center;">' . esc_html( $emails->get_heading() ) . '</p>';
}
add_action( 'rpress_email_header', 'my_email_header' );

Notes#

Output is captured with output buffering, so print rather than return.

Source#

Fired from:

  • includes/emails/class-rpress-emails.php (line 263), in RPRESS_Emails::build_email()

See also#

Was this page helpful?