Skip to content

Instantly share code, notes, and snippets.

<?php
if (!function_exists('render_template')) {
/**
* Setup replacements and find and replace them in a specific template
*
* @param string $filename the filename of the template including extension
* @param string $dir (optional) the directory where the file is hosted relative to your theme
* @param string $open the opening wrapper for the placeholder
* @param string $close the closing wrapper for the placeholder
* @return string