HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/onlineshop/wp-content/plugins/engotheme/widget.class.php
<?php
/**
 * $Desc
 *
 * @version    $Id$
 * @package    wpbase
 * @author     EngoTheme Team <engotheme@gmail.com >
 * @copyright  Copyright (C) 2015  engotheme.com. All Rights Reserved.
 * @license    GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html
 *
 * @website  http://www.engotheme.com
 * @support  http://www.engotheme.com/support/
 */
if(!class_exists('Engotheme_Widget')){
	
abstract class Engotheme_Widget extends WP_Widget{

	protected $widgetName='';
	/**
	 * this method check overriding layout path in current template
	 */
	public function renderLayout($layout='default' ){  
		$output='';
		$tpl = ENGO_THEME_PLUGIN_THEMER_WIDGET_TEMPLATES .'widgets/'.$this->widgetName.'/'.$layout.'.php';
		$tpl_default = ENGO_THEME_PLUGIN_THEMER_DIR .'templates/widgets/' .$this->widgetName.'/'.$layout.'.php';
  
		if(  is_file($tpl) ){
			return( $tpl );
		}else if( is_file($tpl_default) ){
			return( $tpl_default );
		}
		return  ENGO_THEME_PLUGIN_THEMER_DIR .'templates/widgets/no-layout.php';
	}

	public function selectLayout(){
		$tml_default 	= glob(ENGO_THEME_PLUGIN_THEMER_DIR.'templates/widgets/' .$this->widgetName.'/*.php');
		$tml_new 		= glob(ENGO_THEME_PLUGIN_THEMER_WIDGET_TEMPLATES .'widgets/'.$this->widgetName.'/*.php');
		$layout = array_merge($tml_default,$tml_new);
		foreach ($layout as $key => $value) {
			$layout[$key] = basename($value,'.php');
		}
		$layout = array_unique($layout);
		return $layout;
	}

}
}