# darkify/1.3.2/src/Helpers/Helpers.php

Darkify – Dark Mode &amp; Night Mode for Website &amp; Admin (Dark Theme Included), version 1.3.2. 48 lines.

- Page: https://pluginprobe.com/plugins/darkify/1.3.2/code/src/Helpers/Helpers.php
- Raw: https://pluginprobe.com/plugins/darkify/1.3.2/raw/src/Helpers/Helpers.php
- Modified: 2025-03-24T01:22:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/darkify/1.3.2/code/src/Helpers/Helpers.php#L10-L20`.

```php
<?php

/**
 * The public-facing functionality of the plugin.
 *
 * Defines the plugin name, version, and two examples hooks for how to
 * enqueue the public-facing stylesheet and JavaScript.
 *
 * @link       https://themeatelier.net
 * @since      1.0.0
 *
 * @package darkify
 * @subpackage darkify/src/Helpers
 * @author     ThemeAtelier<themeatelierbd@gmail.com>
 */

namespace ThemeAtelier\Darkify\Helpers;

/**
 * The Helpers class to manage all public facing stuffs.
 *
 * @since 1.0.0
 */
class Helpers
{
    /**
     * Custom Template locator .
     *
     * @param  mixed $template_name template name .
     * @param  mixed $template_path template path .
     * @param  mixed $default_path default path .
     * @return string
     */
    public static function darkify_locate_template($template_name, $default_path = '')
    {
        if (!$default_path) {
            $default_path = DARKIFY_PATH . 'src/Frontend/Templates/';
        }
        $template = locate_template($template_name);
        // Get default template.
        if (!$template) {
            $template = $default_path . $template_name;
        }
        // Return what we found.
        return $template;
    }
}

```
