in_array( $type, self::TYPES, true ) ? $type : 'info', 'message' => $message, ), self::TTL ); } /** * Print and forget the queued notice. * * @return void */ public static function render(): void { $notice = get_transient( self::key() ); if ( ! is_array( $notice ) ) { return; } delete_transient( self::key() ); printf( '
%2$s