Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
define_constants(); $this->theme_fallback(); add_action( 'plugins_loaded', [ $this, 'on_plugins_loaded' ] ); } /** * Define the required plugin constants * * @return void */ public function define_constants() { define( 'WALLOX_ADDON_VERSION', self::VERSION ); define( 'WALLOX_ADDON_FILE', __FILE__ ); define( 'WALLOX_ADDON_PATH', __DIR__ ); define( 'WALLOX_ADDON_URL', plugins_url( '', WALLOX_ADDON_FILE ) ); define( 'WALLOX_ADDON_ASSETS', WALLOX_ADDON_URL . '/assets' ); } /** * register fallback theme functions * * @return void */ public function theme_fallback() { include WALLOX_ADDON_PATH . '/common/functions.php'; include wallox_get_common_function( 'theme-functions.php' ); } /** * Load Textdomain * * Load plugin localization files. * * Fired by `init` action hook. * * @since 1.0.0 * * @access public */ public function i18n() { load_plugin_textdomain( 'wallox-addon', false, WALLOX_ADDON_PATH . '/languages' ); } /** * On Plugins Loaded * * Checks if Elementor has loaded, and performs some compatibility checks. * If All checks pass, inits the plugin. * * Fired by `plugins_loaded` action hook. * * @since 1.0.0 * * @access public */ public function on_plugins_loaded() { new Layerdrops\Wallox\Assets(); new Layerdrops\Wallox\PostTypes(); new Layerdrops\Wallox\Utility(); new Layerdrops\Wallox\Megamenu(); new Layerdrops\Wallox\Customizer(); new Layerdrops\Wallox\Frontend\Shortcodes(); if ( is_admin() ) { new Layerdrops\Wallox\Admin(); } add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ], 991 ); add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] ); add_action( 'customize_controls_enqueue_scripts', [ $this, 'customize_controls_scripts' ] ); if ( $this->is_compatible() ) { add_action( 'elementor/init', [ $this, 'init' ] ); } } public function customize_controls_scripts() { wp_enqueue_script( 'select2' ); wp_enqueue_script( 'wallox-addon-customizer' ); } public function admin_enqueue_scripts() { wp_enqueue_style( 'select2' ); wp_enqueue_style( 'wallox-addon-admin-style' ); } public function enqueue_scripts() { wp_enqueue_style( 'animate' ); wp_enqueue_style( 'custom-animate' ); wp_enqueue_style( 'bootstrap-select' ); wp_enqueue_style( 'bxslider' ); wp_enqueue_style( 'jarallax' ); wp_enqueue_style( 'jquery-magnific-popup' ); wp_enqueue_style( 'nouislider' ); wp_enqueue_style( 'nouislider-pips' ); wp_enqueue_style( 'tiny-slider' ); wp_enqueue_style( 'odometer' ); wp_enqueue_style( 'owl-carousel' ); wp_enqueue_style( 'owl-theme' ); wp_enqueue_style( 'reey-font' ); wp_enqueue_style( 'alagambe-font' ); wp_enqueue_style( 'swiper' ); wp_enqueue_style( 'slick' ); wp_enqueue_style( 'slick-theme' ); wp_enqueue_style( 'timepicker' ); wp_enqueue_style( 'jquery-ui' ); wp_enqueue_style( 'wallox-addon-style' ); wp_enqueue_script( 'jquery-ui-datepicker' ); wp_enqueue_script( 'bootstrap-select' ); wp_enqueue_script( 'jquery-bxslider' ); wp_enqueue_script( 'countdown' ); wp_enqueue_script( 'jarallax' ); wp_enqueue_script( 'jquery-ui' ); wp_enqueue_script( 'jquery-ajaxchimp' ); wp_enqueue_script( 'jquery-appear' ); wp_enqueue_script( 'jquery-magnific-popup' ); wp_enqueue_script( 'jquery-validate' ); wp_enqueue_script( 'nouislider' ); wp_enqueue_script( 'tiny-slider' ); wp_enqueue_script( 'wnumb' ); wp_enqueue_script( 'odometer' ); wp_enqueue_script( 'owl-carousel' ); wp_enqueue_script( 'jquery-circle-progress' ); wp_enqueue_script( 'swiper' ); wp_enqueue_script( 'slick' ); wp_enqueue_script( 'wow' ); wp_enqueue_script( 'sharer' ); wp_enqueue_script( 'timepicker' ); wp_enqueue_script( 'circletype' ); wp_enqueue_script( 'circleletter' ); wp_enqueue_script( 'splittext-gsap-script' ); wp_enqueue_script( 'scrolltrigger-gsap-script' ); wp_enqueue_script( 'gsap-main-script' ); wp_enqueue_script( 'wallox-gsap-script' ); wp_enqueue_script( 'wallox-addon-script' ); wp_localize_script( 'wallox-addon-script', 'wallox_login_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'login_redirect_url' => ! empty( get_theme_mod( 'login_redirect_url' ) ) ? get_theme_mod( 'login_redirect_url' ) : esc_url( home_url( '/' ) ), 'registration_redirect_url' => ! empty( get_theme_mod( 'registration_redirect_url' ) ) ? get_theme_mod( 'registration_redirect_url' ) : esc_url( home_url( '/' ) ), 'message' => wp_kses( __( 'Error:Please use valid userName or password', 'wallox-addon' ), 'wallox-addon' ), 'check_login' => is_user_logged_in() ? 'yes' : 'no', 'str_login' => esc_html__( 'Please login to add favorite!', 'wallox-addon' ), ) ); } /** * Compatibility Checks * * Checks if the installed version of Elementor meets the plugin's minimum requirement. * Checks if the installed PHP version meets the plugin's minimum requirement. * * @since 1.0.0 * * @access public */ public function is_compatible() { // Check if Elementor installed and activated if ( ! did_action( 'elementor/loaded' ) ) { add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] ); return false; } // Check for required Elementor version if ( ! version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) { add_action( 'admin_notices', [ $this, 'admin_notice_minimum_elementor_version' ] ); return false; } // Check for required PHP version if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) { add_action( 'admin_notices', [ $this, 'admin_notice_minimum_php_version' ] ); return false; } return true; } /** * Initialize the plugin * * Load the plugin only after Elementor (and other plugins) are loaded. * Load the files required to run the plugin. * * Fired by `plugins_loaded` action hook. * * @since 1.0.0 * * @access public */ public function init() { $this->i18n(); // register category add_action( 'elementor/elements/categories_registered', [ $this, 'add_elementor_widget_categories' ] ); // load icons add_filter( 'elementor/icons_manager/additional_tabs', array( $this, 'add_elementor_custom_icons' ) ); // Add Plugin actions add_action( 'elementor/widgets/register', [ $this, 'init_widgets' ] ); } /** * Init Widgets * * Include widgets files and register them * * @since 1.0.0 * * @access public */ public function init_widgets() { // Register widget \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\MainSlider() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Features() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\About() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Service() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\WhyChooseUs() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Project() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Testimonials() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Team() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\TeamDetails() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Blog() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Faq() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FaqSearch() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Instagram() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\SidebarNavmenu() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\ServiceAppointment() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\ServiceDetails() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\ProjectCategory() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Counter() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\TeamSkills() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Gallery() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Shop() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Login() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\GoogleMaps() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Header() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\HomeShowCase() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Sponsors() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\CallToAction() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\SidebarCallToAction() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\PortfolioDetails() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Funfact() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Pricing() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Process() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Certificate() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\ErrorPage() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\IconBox() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Benefit() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Pagination() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\Shape() ); if ( function_exists( 'wpcf7' ) ) { \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\ContactForm() ); } \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterTop() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterAbout() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterNavMenu() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterContact() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterBGImage() ); // \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterGallery() ); \Elementor\Plugin::instance()->widgets_manager->register( new Layerdrops\Wallox\Widgets\FooterCopyright() ); } public function add_elementor_widget_categories( $elements_manager ) { $elements_manager->add_category( 'wallox-category', [ 'title' => __( 'Wallox Addon', 'wallox-addon' ), 'icon' => 'fa fa-plug', ] ); } public function add_elementor_custom_icons( $icons ) { $infos = [ [ 'name' => 'wallox-icons', 'class' => 'icon',], ]; $icons = wallox_get_elementor_icons( $infos ); return $icons; } /** * Admin notice * * Warning when the site doesn't have Elementor installed or activated. * * @since 1.0.0 * * @access public */ public function admin_notice_missing_main_plugin() { if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); $message = sprintf( /* translators: 1: Plugin name 2: Elementor */ esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'wallox-addon' ), '' . esc_html__( 'Wallox Theme Addon', 'wallox-addon' ) . '', '' . esc_html__( 'Elementor', 'wallox-addon' ) . '' ); printf( '

%1$s

', $message ); } /** * Admin notice * * Warning when the site doesn't have a minimum required Elementor version. * * @since 1.0.0 * * @access public */ 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.', 'wallox-addon' ), '' . esc_html__( 'Wallox Theme Addon', 'wallox-addon' ) . '', '' . esc_html__( 'Elementor', 'wallox-addon' ) . '', self::MINIMUM_ELEMENTOR_VERSION ); printf( '

%1$s

', $message ); } /** * Admin notice * * Warning when the site doesn't have a minimum required PHP version. * * @since 1.0.0 * * @access public */ 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.', 'wallox-addon' ), '' . esc_html__( 'Wallox Theme Addon', 'wallox-addon' ) . '', '' . esc_html__( 'PHP', 'wallox-addon' ) . '', self::MINIMUM_PHP_VERSION ); printf( '

%1$s

', $message ); } } Wallox_Addon_Extension::instance();