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/azfilmz.com/wp-content/plugins/haru-filmmaker/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/azfilmst/azfilmz.com/wp-content/plugins/haru-filmmaker/haru-filmmaker.php
<?php
/**
 * Plugin Name: Haru Filmmaker
 * Plugin URI: http://harutheme.com
 * Description: Haru Filmmaker - A Filmmaker WordPress plugin by HaruTheme.
 * Version: 1.5.9
 * Author: HaruTheme
 * Author URI: http://harutheme.com
 *
 * Text Domain: haru-filmmaker
 * Domain Path: /languages/
 *
 * @package Haru Filmmaker
 * @category Core Plugin
 * @author HaruTheme
 *
 **/

if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if access directly
}

if ( ! class_exists( 'Haru_Filmmaker' ) ) {
    class Haru_Filmmaker {
        protected $prefix;

        protected $version;

        function __construct() {
            $this->version = '1.5.9';
            $this->prefix = 'haru-filmmaker';
            $this->define_constants();
            $this->include_files();
            $this->init();
        }

        function define_constants() {
            if ( ! defined( 'PLUGIN_HARU_FILMMAKER_DIR' ) ) {
                define( 'PLUGIN_HARU_FILMMAKER_DIR', plugin_dir_path(__FILE__) );
            }

            if ( ! defined( 'PLUGIN_HARU_FILMMAKER_URL' ) ) {
                define( 'PLUGIN_HARU_FILMMAKER_URL', plugin_dir_url( __FILE__ ) );
            }

            if ( ! defined( 'PLUGIN_HARU_FILMMAKER_FILE' ) ) {
                define( 'PLUGIN_HARU_FILMMAKER_FILE', __FILE__ );
            }

            if ( ! defined( 'PLUGIN_HARU_FILMMAKER_NAME' ) ) {
                define( 'PLUGIN_HARU_FILMMAKER_NAME', 'haru-filmmaker' );
            }

            if ( ! defined( 'HARU_FILMMAKER_SHORTCODE_CATEGORY' ) ) {
                define( 'HARU_FILMMAKER_SHORTCODE_CATEGORY', esc_html__( 'Filmmaker Shortcodes', 'haru-filmmaker' ) );
            }
        }

        function init() {
            add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
            add_action( 'admin_init', array( $this, 'haru_admin_script' ) );
            add_action( 'wp_enqueue_scripts', array( $this, 'haru_frontend_script' ), 1 );
            add_action( 'widgets_init', array( $this, 'haru_filmmaker_register_sidebar' ) );
            // Apply filter do_shortcode
            add_filter( 'widget_text', 'do_shortcode' );
            add_filter( 'widget_content', 'do_shortcode' );
        }

        public static function create_pages() {
            if ( ! current_user_can( 'activate_plugins' ) ) return;

            global $wpdb;
  
            if ( null === $wpdb->get_row( "SELECT post_name FROM {$wpdb->prefix}posts WHERE post_name = 'watch-later'", 'ARRAY_A' ) ) {
                 
                $current_user = wp_get_current_user();
                
                // create post object
                $page = array(
                  'post_title'      => esc_html__( 'Watch Later', 'haru-filmmaker' ),
                  'post_content'    => '[haru_watch_later]',
                  'post_status'     => 'publish',
                  'post_author'     => $current_user->ID,
                  'post_type'       => 'page'
                );
                
                // insert the post into the database
                $watch_later_page = wp_insert_post( $page );
            }
        }

        function include_files() {
            // Libraries
            require_once( 'includes/libraries/_init.php' );
            require_once( 'includes/posttypes/_init.php' );
            require_once( 'includes/filmmaker/_init.php' ); // Filmmaker
            require_once( 'includes/widgets/widgets.php' );
            // require_once( 'includes/scss/_init.php' );
        }

        public function load_plugin_textdomain() {
            load_plugin_textdomain( 'haru-filmmaker', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/'  );
        }

        public function haru_filmmaker_register_sidebar() {
            register_sidebar( 
                array(
                    'name'          => esc_html__( 'Filmmaker Sidebar', 'haru-filmmaker' ),
                    'id'            => 'filmmaker-sidebar',
                    'description'   => esc_html__( 'Widget Area for Filmmaker plugin', 'haru-filmmaker' ),
                    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
                    'after_widget'  => '</aside>',
                    'before_title'  => '<h4 class="widget-title"><span>',
                    'after_title'   => '</span></h4>',
                ) 
            );
        }


        // Load script admin
        public function haru_admin_script() {
            // CSS
            wp_enqueue_style( $this->prefix . '-admin', plugins_url( PLUGIN_HARU_FILMMAKER_NAME.'/admin/assets/css/admin.css'), array(), $this->version, 'all' );

            // JS
        }
        // Load script front-end
        public function haru_frontend_script() {
            // CSS
            if ( !is_admin() ) {
                // Remove VC FontAwesome
                wp_deregister_style( 'vc_font_awesome_5_shims' );
                wp_deregister_style( 'vc_font_awesome_5' );
                $url_font_awesome_all = plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/fontawesome/css/all.min.css' );
                $url_font_awesome_shims = plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/fontawesome/css/v4-shims.min.css' );
                wp_enqueue_style( 'fontawesome-all', $url_font_awesome_all, array());
                wp_enqueue_style( 'fontawesome-shims', $url_font_awesome_shims, array());

                // wp_enqueue_style( 'animate', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/animate/animate.min.css' ), array() );

                wp_deregister_style('mediaelement');
                wp_enqueue_style( 'mediaelement', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/mediaelement/mediaelementplayer.css'), array() );

                wp_enqueue_style( 'magnific-popup', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/magnificPopup/magnific-popup.css'), array() );

                if ( file_exists( PLUGIN_HARU_FILMMAKER_DIR . '/assets/css/style-custom.min.css' ) ) {
                    wp_enqueue_style( 'haru-filmmaker-custom', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/css/style-custom.min.css'), array() );
                } else {
                    wp_enqueue_style( 'haru-filmmaker', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/css/style.css'), array() );
                }
            }
            // JS
            if ( !is_admin() ) {
                wp_deregister_script('mediaelement');
                wp_enqueue_script( 'mediaelement', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/mediaelement/mediaelement-and-player.min.js'), array(), false, true);

                wp_enqueue_script( 'js-cookie', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/cookie/js-cookie.min.js'), array( 'jquery' ), '', true );

                wp_enqueue_script( 'magnific-popup', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/magnificPopup/jquery.magnific-popup.min.js'), array( 'jquery' ), '', true );

                wp_enqueue_script( 'infinitescroll', plugins_url ( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/infinitescroll/jquery.infinitescroll.min.js'), array( 'jquery' ), '', true );

                wp_register_script( 'isotope', plugins_url ( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/isotope/isotope.pkgd.min.js'), array( 'jquery' ), '', true );
                wp_register_script( 'packery-mode', plugins_url ( PLUGIN_HARU_FILMMAKER_NAME . '/assets/libraries/isotope/packery-mode.pkgd.min.js'), array( 'jquery' ), '', true );

                wp_enqueue_script( 'haru-filmmaker', plugins_url( PLUGIN_HARU_FILMMAKER_NAME . '/assets/js/haru-filmmaker.js'), array( 'jquery' ), '', true );
            }

            wp_localize_script( 'haru-filmmaker', 'haru_filmmaker_ajax_url', get_site_url() . '/wp-admin/admin-ajax.php?activate-multi=true' );
            wp_localize_script( 'haru-filmmaker', 'haru_filmmaker_plugin_url', PLUGIN_HARU_FILMMAKER_URL );
        }
    }

    // Run Haru_Filmmaker
    if ( !function_exists( 'haru_init_haru_filmmaker' ) ) {
        function haru_init_haru_filmmaker() {
            $haruFilmmaker = new Haru_Filmmaker();

            return $haruFilmmaker;
        }
    }

    haru_init_haru_filmmaker();

    // Create pages when active
    register_activation_hook( __FILE__, array( 'Haru_Filmmaker', 'create_pages' ) );
}

Youez - 2016 - github.com/yon3zu
LinuXploit