Skip to content

Instantly share code, notes, and snippets.

@lots0logs
Created March 11, 2019 23:04
Show Gist options
  • Save lots0logs/89fb4046a93262d67f6d54173862d43b to your computer and use it in GitHub Desktop.
Save lots0logs/89fb4046a93262d67f6d54173862d43b to your computer and use it in GitHub Desktop.
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
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment