dozent_set_flash_message( string $message = '', string $type = 'success' )

Store the message for display only one time.


Description

Store by this function and retrieve the message by using dozent_set_flash_message(); function

Example usage:

dozent_set_flash_message( $message );
dozent_set_flash_message( $message, 'info' );

We can simply store flash message as shown above.

See also


Parameters

$message

(string) (Optional)

Default value: ''

$type

(string) (Optional) success|warning|info

Default value: 'success'


Source

File: includes/core-functions.php

	function dozent_set_flash_message( $message = '', $type = 'success' ) {
		if ( ! headers_sent() ) {

			setcookie( 'dozent_flash[message]', $message, time() + 3600 );
			setcookie( 'dozent_flash[type]', $type, time() + 3600 );
			setcookie( 'dozent_flash[view_count]', 1, time() + 3600 );

		}
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.