llms_notice_count( string $notice_type = '' )
Returns a count of all current notices by type.
Parameters Parameters
- $notice_type
-
(string) (Optional) Type of notice passed. IE: error, success, warning
Default value: ''
Return Return
(int)
Source Source
File: includes/functions/llms.functions.notice.php
function llms_notice_count( $notice_type = '' ) { $notice_count = 0; $all_notices = llms()->session->get( 'llms_notices', array() ); if ( isset( $all_notices[ $notice_type ] ) ) { $notice_count = absint( count( $all_notices[ $notice_type ] ) ); } elseif ( empty( $notice_type ) ) { foreach ( $all_notices as $notices ) { $notice_count += absint( count( $all_notices ) ); } } return $notice_count; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |