For a Wordpress plugin, I made a function that contains a big HTML portion (following WP docs, I used ob_start and ob_get_clean to insert it):
function myShortcode() {
ob_start();?>
<!-- here a lot of HTML -->
<?php
return ob_get_clean();
}
I would like to put the HTML outside this function and include or require it.
Is this possible? Is there something I should be aware of? Is it preferable file_get_contents? Any other tip is appreciated, thanks in advance