Email_Abstract::get_template_context( array $args = array() )
Get template context for email.
Contents
Parameters
- $args
-
(array) (Optional) The arguments.
Default value: array()
Return
(array) $args The modified arguments
Source
File: src/Tickets/Emails/Email_Abstract.php
public function get_template_context( $args = [] ): array {
$defaults = $this->get_default_template_context();
$args = wp_parse_args( $args, $defaults );
/**
* Allow filtering the template context globally.
*
* @since 5.5.11
*
* @param array $args The email arguments.
* @param string $id The email id.
* @param string $template Template name.
* @param Email_Abstract $this The email object.
*/
$args = apply_filters( 'tec_tickets_emails_template_args', $args, $this->id, $this->template, $this );
/**
* Allow filtering the template context.
*
* @since 5.5.11
*
* @param array $args The email arguments.
* @param string $id The email id.
* @param string $template Template name.
* @param Email_Abstract $this The email object.
*/
$args = apply_filters( "tec_tickets_emails_{$this->slug}_template_args", $args, $this->id, $this->template, $this );
return $args;
}
Changelog
| Version | Description |
|---|---|
| 5.5.11 | Introduced. |