Skip to content

Instantly share code, notes, and snippets.

View thuijssoon's full-sized avatar

Thijs Huijssoon thuijssoon

  • The Netherlands
View GitHub Profile
@nathanielks
nathanielks / get_template.php
Last active February 22, 2022 08:49
A set of functions for finding and getting a template and being able to pass parameters to it via an array. Borrowed from https://github.com/woothemes/woocommerce/blob/e3cc5931bad28b24233fb9d14c61c096cbd4b122/includes/wc-core-functions.php#L91
<?php
/**
* Get other templates (e.g. product attributes) passing attributes and including the file.
*
* @access public
* @param mixed $template_name
* @param array $args (default: array())
* @param string $template_path (default: '')
* @param string $default_path (default: '')
* @return void */