403Webshell
Server IP : 5.129.245.98  /  Your IP : 216.73.216.246
Web Server : Apache/2.4.66 (Debian)
System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/content-egg/application/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/content-egg/application/components/WidgetTemplateManager.php
<?php

namespace ContentEgg\application\components;

defined('\ABSPATH') || exit;

/**
 * WidgetTemplateManager class file
 *
 * @author keywordrush.com <support@keywordrush.com>
 * @link https://www.keywordrush.com
 * @copyright Copyright &copy; 2025 keywordrush.com
 */
class WidgetTemplateManager extends TemplateManager
{
    const TEMPLATE_DIR = 'templates';
    const CUSTOM_TEMPLATE_DIR = 'content-egg-templates';
    const TEMPLATE_PREFIX = 'wdgt_';

    protected $widget_slug;
    protected $widget_short_slug;
    private static $_instances = array();

    public static function getInstance($widget_slug)
    {
        if (!isset(self::$_instances[$widget_slug]))
        {
            $class = get_called_class();
            self::$_instances[$widget_slug] = new $class($widget_slug);
        }

        return self::$_instances[$widget_slug];
    }

    private function __construct($widget_slug)
    {
        $this->widget_slug = $widget_slug;
        $this->widget_short_slug = preg_replace('/^cegg_/', '', $this->widget_slug);
    }

    public function getTempatePrefix()
    {
        return self::TEMPLATE_PREFIX . $this->widget_short_slug . '_';
    }

    public function getTempateDir()
    {
        return \ContentEgg\PLUGIN_PATH . self::TEMPLATE_DIR;
    }

    public function getCustomTempateDirs()
    {
        $paths = array(
            'child-theme' => \get_stylesheet_directory() . '/' . self::CUSTOM_TEMPLATE_DIR, //child theme
            'theme' => \get_template_directory() . '/' . self::CUSTOM_TEMPLATE_DIR, // theme
            'custom' => \WP_CONTENT_DIR . '/' . self::CUSTOM_TEMPLATE_DIR,
        );

        return \apply_filters('content_egg_widget_template_dirs', $paths);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit