😆Cách sử dụng ob_start (ok)

Example:
ob_start();
echo '<a href=".">self link</a>';
$data = ob_get_contents();
ob_end_clean();
echo $data;
add_shortcode('greeting_teen', 'wpb_demo_shortcode_teen');
function wpb_demo_shortcode_teen()
{
	ob_start();
?>
	<div class="container-fluid videovisitor videovisitor--padding">
		<div class="row">
			<div class="container">
				<div class="row">
					<div class="row__inner row__inner--pad">
						<?php get_template_part('template-parts/feature-posts/feature-posts', 'two'); ?>
					</div>
				</div>
			</div>
		</div>
	</div>
<?php
	$data = ob_get_contents();
	ob_end_clean();
	return $data;
}

Last updated