LLMS_Emails::get_email( string $id, array $args = array() )
Retrieve a new instance of an email
Description Description
Parameters Parameters
- $id
-
(string) (Required) email id
- $args
-
(array) (Optional) arguments to pass to the email
Default value: array()
Return Return
(obj)
Source Source
File: includes/class.llms.emails.php
public function get_email( $id, $args = array() ) { $emails = $this->get_emails(); // if we have an email matching the ID, return an instance of that email class if ( isset( $emails[ $id ] ) ) { return new $emails[ $id ]( $args ); } // otherwise return a generic email and set the ID to be the requested ID $generic = new $emails['generic']( $args ); $generic->set_id( $id ); return $generic; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |