Email::__construct( string $event, array $args = array() )
Description #
Initialize email class.
Parameters #
- $eventstring (Required) Event name.
- $argsarray (Optional) Arguments. Default value: array()
Source #
File: addons/free/email/class-email.php
public function __construct( $event, $args = [] ) { $this->event = $event; $this->args = wp_parse_args( $args, array( 'users' => [], 'subject' => '', 'tags' => array( 'site_name' => get_bloginfo( 'name' ), 'site_url' => get_bloginfo( 'url' ), 'site_description' => get_bloginfo( 'description' ), ), 'template' => [], '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/free/email/class-email.php:92
Add your comment