Helper::__construct( string $event, array $args = array() )
Description #
Initialize email class.
Parameters #
- $eventstring (Required) Event name.
- $argsarray (Optional) Arguments. Default value: array()
Source #
File: addons/email/class-helper.php
public function __construct( $event, $args = array() ) { $this->event = $event; $this->args = ap_parse_args( $args, array( 'users' => array(), 'subject' => '', 'tags' => array( 'site_name' => get_bloginfo( 'name' ), 'site_url' => get_bloginfo( 'url' ), 'site_description' => get_bloginfo( 'description' ), ), 'template' => array(), 'headers' => array( 'Content-Type: text/html; charset=utf-8', ), ) ); $this->email_headers = $this->args['headers']; unset( $this->args['headers'] ); // Add template tags. if ( ! empty( $this->args['tags'] ) ) { foreach ( $this->args['tags'] as $tag => $content ) { $this->add_template_tag( $tag, $content ); } } }
Expand full source code Collapse full source code View on GitHub: addons/email/class-helper.php:90
Add your comment