$type, 'message' => $message, ), 60 ); } /** * Render and clear the queued notice. * * @return void */ public static function render(): void { $notice = get_transient( self::key() ); if ( ! is_array( $notice ) || empty( $notice['message'] ) ) { return; } delete_transient( self::key() ); $type = isset( $notice['type'] ) && is_string( $notice['type'] ) ? $notice['type'] : 'info'; printf( '
%2$s