| 1 |
<?php |
| 2 |
|
| 3 |
// If this file is called directly, abort. |
| 4 |
if (!defined('WPINC')) { |
| 5 |
die; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* Utils class |
| 10 |
*/ |
| 11 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound |
| 12 |
class EAUtils |
| 13 |
{ |
| 14 |
public function get_template_path($template_file_name) |
| 15 |
{ |
| 16 |
$default_path = EA_SRC_DIR . 'templates/' . $template_file_name; |
| 17 |
$theme_path = get_stylesheet_directory() . '/easy-appointments/' . $template_file_name; |
| 18 |
|
| 19 |
if (file_exists($theme_path)) { |
| 20 |
return $theme_path; |
| 21 |
} |
| 22 |
|
| 23 |
return $default_path; |
| 24 |
} |
| 25 |
} |