llms_get_notices()
Gets messages and errors which are stored in the session, then clears them.
Return Return
(string)
Source Source
File: includes/functions/llms.functions.notice.php
function llms_get_notices() { $all_notices = apply_filters( 'lifterlms_print_notices', llms()->session->get( 'llms_notices', array() ) ); $notice_types = llms_get_notice_types(); ob_start(); foreach ( $notice_types as $notice_type ) { if ( llms_notice_count( $notice_type ) > 0 ) { llms_get_template( "notices/{$notice_type}.php", array( 'messages' => $all_notices[ $notice_type ], ) ); } } add_action( 'shutdown', 'llms_clear_notices', 1 ); // Prior to shutdown functions executed by session manager. return ob_get_clean(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |