<?php

/**
 * Convert output buffer to string.
 *
 * @param callable $callback - Function that generates output
 * @param array $args - Optional arguments to pass to the callback
 * @return string
 */
function dsm_construct_html($callback, $args = []) {
	ob_start();
	call_user_func_array($callback, $args);
	return ob_get_clean();
}
