Created
March 11, 2019 23:04
-
-
Save lots0logs/89fb4046a93262d67f6d54173862d43b to your computer and use it in GitHub Desktop.
Render Dynamic Content Frontend Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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