lots0logs
3/11/2019 - 11:04 PM

Render Dynamic Content Frontend Example

Render Dynamic Content Frontend Example

<?php

...
    
public function render( $unprocessed_props, $content = null, $render_slug ) {
	$title   = $this->_esc_attr( 'title' );
	$content = $this->_esc_attr( 'content', 'full' );

	return sprintf(
		'<div>
			<h2>%1$s</h2>
			%2$s
		</div>',
		$title,
		$content
	);
}