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

LifterLMS LifterLMS

Code Reference

  • Home
  • 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

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

Description #Description


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 ↑

Changelog #Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

Related #Related

Top ↑

Used By #Used By

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

Initialize all variables


Top ↑

User Contributed Notes #User Contributed Notes

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

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