• LifterLMS
  • Knowledge Base
  • Academy
  • Blog
  • Podcast
  • Contributors
  • My Account

LifterLMS LifterLMS

  • Code Reference
  • REST API
  • LLMS-CLI

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Code Reference / Classes / LLMS_Email_Engagement / LLMS_Email_Engagement::merge_emails()

Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Email_Engagement::merge_emails( string $list )

Handles email merge codes that can be used in the to, cc, and bcc fields

Contents

  • Parameters
  • Return
  • Source
  • Related
    • Used By
  • Changelog
  • User Contributed Notes

Parameters #Parameters

$list

(string) (Required) Unmerged, comma-separated list of emails


Top ↑

Return #Return

(array)


Top ↑

Source #Source

File: includes/emails/class.llms.email.engagement.php

	private function merge_emails( $list ) {

		$codes = array(
			'{student_email}',
			'{admin_email}',
		);

		$addresses = array(
			$this->student->ID,
			get_option( 'admin_email' ),
		);

		$merged = str_replace( $codes, $addresses, $list );
		$array  = explode( ',', $merged );
		return array_map( 'trim', $array );

	}

Expand full source code Collapse full source code View on GitHub


Top ↑

Related #Related

Used By #Used By

Used By
Used By Description
includes/emails/class.llms.email.engagement.php: LLMS_Email_Engagement::init()

Initialize all variables


Top ↑

Changelog #Changelog

Changelog
Version Description
3.8.0 Unknown.
3.1.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

© 2014 - 2023 LifterLMS · Privacy Policy · Terms and Conditions

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.