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_Abstract_Notification_View::get_merged_string( string $string )

Merge a string.


Parameters Parameters

$string

(string) (Required) An unmerged string.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/abstracts/llms.abstract.notification.view.php

	private function get_merged_string( $string ) {

		// Only merge if there are codes in the string.
		if ( false !== strpos( $string, '{{' ) ) {

			$merge_code_defaults = $this->get_merge_code_defaults();

			foreach ( $this->get_used_merge_codes( $string ) as $code ) {

				// Set defaults.
				if ( array_key_exists( $code, $merge_code_defaults ) ) {

					$func = 'set_merge_data_default';

					// Set customs with extended class func.
				} else {

					$func = 'set_merge_data';

				}

				$string = str_replace( $code, $this->$func( $code ), $string );

			}
		}

		return apply_filters( $this->get_filter( 'get_merged_string' ), $this->sentence_case( $string ), $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.4.0 Only populate effectively used merged data.
3.8.0
3.37.19 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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