show_for_context( $context ) ) { $notices[] = $notice; } } return $notices; } /** * Lazily initialize the admin notices lib. * * Will load the notices.php file for all active modules, and create notices * for each highlighted log item. */ private static function initialize() { if ( ! self::$initialized ) { ITSEC_Lib::load( 'highlighted-logs' ); foreach ( ITSEC_Lib_Highlighted_Logs::get_highlights() as $id => $highlight ) { self::register( new ITSEC_Admin_Notice_Managers_Only( new ITSEC_Admin_Notice_Screen_Blacklist( new ITSEC_Admin_Notice_Highlighted_Log( $id, $highlight ), array( 'security_page_itsec-logs' ) ) ) ); } ITSEC_Modules::load_module_file( 'notices.php', ':active' ); self::$initialized = true; } } }