Skip to content

Instantly share code, notes, and snippets.

@sunilw
Created October 5, 2022 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunilw/1abb354ad1792d99e0c6ca2a9d93133d to your computer and use it in GitHub Desktop.
Save sunilw/1abb354ad1792d99e0c6ca2a9d93133d to your computer and use it in GitHub Desktop.
php: combine includes and output buffering
function test_one_present_search()
{
ob_start() ;
$form = require('inc/test-01-search-all-types.php');
return ob_get_clean();
}
add_shortcode('test_one', 'test_one_present_search');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment