/** * Load a dashboard template relative to the template dir root * * @package Infinity * @subpackage dashboard * @param string $rel_path Relative path to template from dashboard template root * @param array|stdClass $args Variables to inject into template * @param array|stdClass $defaults Default values of variables being injected into template */ function infinity_dashboard_load_template($rel_path, $args = null, $defaults = null) { // populate local scope extract(wp_parse_args($args, (array) $defaults)); // locate and include the template include infinity_dashboard_locate_template($rel_path); }
/** * Load a dashboard template * * @param string $name Template name */ protected function load_dash_template($name) { // find template $template = infinity_dashboard_locate_template('options/' . $name . '.php'); // include it include $template; }