LLMS_Notification_View_Student_Welcome::set_merge_data( string $code )

Replace merge codes with actual values


Parameters Parameters

$code

(string) (Required) the merge code to ge merged data for


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/notifications/views/class.llms.notification.view.student.welcome.php

	protected function set_merge_data( $code ) {

		switch ( $code ) {

			case '{{DASHBOARD_URL}}':
				$code = llms_get_page_url( 'myaccount' );
				break;

			case '{{PASSWORD_RESET_URL}}':
				$code = llms_lostpassword_url();
				break;

			case '{{SITE_TITLE}}':
				$code = get_bloginfo( 'name', 'display' );
				break;

			case '{{STUDENT_NAME}}':
				$code = $this->user->get_name();
				break;

			case '{{STUDENT_LOGIN}}':
				$field = ( 'yes' === get_option( 'lifterlms_registration_generate_username' ) ) ? 'user_email' : 'user_login';
				$code  = $this->user->get( $field );
				break;

		}

		return $code;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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