PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.3.2
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.3.2
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / src / Helpers / Helpers.php

Helpers.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.3.2, at src/Helpers/Helpers.php

48 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The public-facing functionality of the plugin.
5 *
6 * Defines the plugin name, version, and two examples hooks for how to
7 * enqueue the public-facing stylesheet and JavaScript.
8 *
9 * @link https://themeatelier.net
10 * @since 1.0.0
11 *
12 * @package darkify
13 * @subpackage darkify/src/Helpers
14 * @author ThemeAtelier<themeatelierbd@gmail.com>
15 */
16
17 namespace ThemeAtelier\Darkify\Helpers;
18
19 /**
20 * The Helpers class to manage all public facing stuffs.
21 *
22 * @since 1.0.0
23 */
24 class Helpers
25 {
26 /**
27 * Custom Template locator .
28 *
29 * @param mixed $template_name template name .
30 * @param mixed $template_path template path .
31 * @param mixed $default_path default path .
32 * @return string
33 */
34 public static function darkify_locate_template($template_name, $default_path = '')
35 {
36 if (!$default_path) {
37 $default_path = DARKIFY_PATH . 'src/Frontend/Templates/';
38 }
39 $template = locate_template($template_name);
40 // Get default template.
41 if (!$template) {
42 $template = $default_path . $template_name;
43 }
44 // Return what we found.
45 return $template;
46 }
47 }
48