in_array( $type, array( 'success', 'warning', 'error', 'info' ), true ) ? $type : 'info', 'message' => (string) $message, ); \TurtleReport\Support\TransientStore::set( $key, $notices, 5 * MINUTE_IN_SECONDS ); } /** * Prints and clears queued notices. * * @return void */ public static function render() { $key = self::key(); $notices = get_transient( $key ); if ( ! is_array( $notices ) || ! $notices ) { return; } delete_transient( $key ); foreach ( $notices as $notice ) { printf( '
%2$s