LLMS_Admin_Notices::load_notices()
Loads stored notice IDs from the database
Description Description
Handles potentially malformed data by ensuring that only an array of strings can be loaded.
Return Return
(string[])
Source Source
File: includes/admin/class.llms.admin.notices.php
protected static function load_notices() {
$notices = get_option( 'llms_admin_notices', array() );
if ( ! is_array( $notices ) ) {
$notices = array( $notices );
}
// Remove empty and non-string values.
return array_filter(
$notices,
function ( $notice ) {
return ( ! empty( $notice ) && is_string( $notice ) );
}
);
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.13.0 | Introduced. |