Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
add_category( 'tpcore', array( 'title' => esc_html__('TP Addons', 'tpcore'), 'icon' => 'eicon-banner', ) ); } /** * widget_scripts * * Load required plugin core files. * * @since 1.2.0 * @access public */ public function widget_scripts() { wp_register_script( 'tpcore', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true ); } /** * Editor scripts * * Enqueue plugin javascripts integrations for Elementor editor. * * @since 1.2.1 * @access public */ public function editor_scripts() { add_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 ); wp_enqueue_script( 'tpcore-editor', plugins_url( '/assets/js/editor/editor.js', __FILE__ ), [ 'elementor-editor', ], '1.2.1', true ); } /** * tp_enqueue_editor_scripts */ function tp_enqueue_editor_scripts() { wp_enqueue_style('tp-element-addons-editor', TPCORE_ADDONS_URL . 'assets/css/editor.css', [], '1.0'); } /** * Force load editor script as a module * * @since 1.2.1 * * @param string $tag * @param string $handle * * @return string */ public function editor_scripts_as_a_module( $tag, $handle ) { if ( 'tpcore-editor' === $handle ) { $tag = str_replace( 'tpcore_widget_list() as $key => $widgets){ foreach($widgets as $widget){ $widget_file = TPCORE_ELEMENTS_PATH . '/' . $key . '/' . $widget . '.php'; if ( file_exists( $widget_file ) ) { require_once $widget_file; } } } if(class_exists('WooCommerce')){ foreach($this->tpcore_widget_list_woo() as $key => $widgets){ foreach($widgets as $widget){ $widget_file = TPCORE_ELEMENTS_PATH . '/' . $key . '/' . $widget . '.php'; if ( file_exists( $widget_file ) ) { require_once $widget_file; } } } } } public function tpcore_widget_list() { return [ // all header widgest 'header' => [ 'header-builder', 'header-builder-2', 'header-builder-3', 'header-builder-4', 'header-builder-5', 'header-ecommerce', 'header-vertical', 'header-horizontal', 'header-full-width', 'header-interactive-links', 'header-wrapper-slider', 'header-showcase', 'header-inner' ], // all footer widgets 'footer' => [ 'footer-menu', 'footer-lets-contact', 'footer-social', 'footer-contact-single-link', 'footer-links', 'footer-contact', 'footer-newsletter', ], // all blog widgets 'blog' => [ 'blog-grid', 'blog-hero', 'blog-hero-slider', 'blog-metro', 'blog-standard', 'blog-sidebar', 'blog-hero-banner' ], // all offcanvas widgets 'offcanvas' => [ 'offcanvas-mobile-menu', ], // menu widgets 'menu' => [ 'home-demo', 'menu-list', ], // all portfolio widgets 'portfolio' => [ 'portfolio-card', 'portfolio-slider', 'portfolio-scroll', 'portfolio-butterfly', 'portfolio-horizontal', 'portfolio-filterable', 'portfolio-navigation', 'portfolio-horizontal-line', 'portfolio-scroll-moving', // details 'portfolio-details-meta', 'portfolio-details-list', 'portfolio-details-hero', 'portfolio-details-video', ], // all buttons widgets 'buttons' => [ 'button', 'button-2', 'button-3', ], // all full screen widgets 'full-screen' => [ 'horizontal-slider', 'showcase-slider', 'wrapper-slider', 'interactive-links', 'showcase-carousel', ], 'banner' => [ 'banner', ], 'instagram' => [ 'instagram', ], 'price' => [ 'price-box' ], 'faq' => [ 'faq', 'icon-faq' ], 'about' => [ 'about-hero-title', 'about-us-scroll', 'about-hero-social', ], 'common' => [ 'counter', 'animated-text', 'list', 'shape', 'icon-box', 'text-slider', 'theme-social', 'scroll-down', 'color-pallate', 'icon-box-scroll', 'link-text', 'advanced-tab', 'close-button-icon', ], // hamim // all services widgets 'services' => [ 'services', 'work-experience', 'services-advance-tab', 'services-panel', ], // all heading widgets 'heading' => [ 'heading', 'heading-2', 'animated-heading', 'heading-stock', ], // all video widgets 'video' => [ 'video-play-mp4', ], // all brand widgets 'brand' => [ 'brand-slider', 'brand-title', 'brand-grid', 'brand-carousel', ], // all award widgets 'award' => [ 'award', ], // all team widgets 'team' => [ 'team-scroll', 'team-box', 'team-details-header' ], // all testimonial widgets 'testimonial' => [ 'testimonial-slider', ], // all image widgets 'image' => [ 'image', 'animated-image', 'animated-video', 'buterfly-image', 'image-slider', ], // all hero widgets 'hero' => [ 'hero-banner', ], // lanzu // all hero widgets 'page' => [ 'page-title', ], 'contact' => [ 'contact-form', 'contact-cta', 'contact-link', 'contact-btn', ], ]; } // tpcore_widget_list_woo public function tpcore_widget_list_woo() { return [ 'woocommerce' => [ 'product-card', 'shop-hero', ], ]; } /** * Add page settings controls * * Register new settings for a document page settings. * * @since 1.2.1 * @access private */ // private function add_page_settings_controls() { // require_once( __DIR__ . '/page-settings/manager.php' ); // new Page_Settings(); // } /** * Register controls * * @param Controls_Manager $controls_Manager */ public function register_controls(Controls_Manager $controls_Manager) { include_once(TPCORE_ADDONS_DIR . '/controls/tpgradient.php'); $tpgradient = 'TPCore\Elementor\Controls\Group_Control_TPGradient'; $controls_Manager->add_group_control($tpgradient::get_type(), new $tpgradient()); include_once(TPCORE_ADDONS_DIR . '/controls/tpbggradient.php'); $tpbggradient = 'TPCore\Elementor\Controls\Group_Control_TPBGGradient'; $controls_Manager->add_group_control($tpbggradient::get_type(), new $tpbggradient()); } public function tp_add_custom_icons_tab($tabs = array()){ // Append new icons $feather_icons = array( 'feather-activity', 'feather-airplay', 'feather-alert-circle', 'feather-alert-octagon', 'feather-alert-triangle', 'feather-align-center', 'feather-align-justify', 'feather-align-left', 'feather-align-right', ); $tabs['tp-feather-icons'] = array( 'name' => 'tp-feather-icons', 'label' => esc_html__('TP - Feather Icons', 'tpcore'), 'labelIcon' => 'tp-icon', 'prefix' => '', 'displayPrefix' => 'tp', 'url' => TPCORE_ADDONS_URL . 'assets/css/feather.css', 'icons' => $feather_icons, 'ver' => '1.0.0', ); // Append flaticon fonts icons $flat_icons = array( 'flat-icon-next', 'flat-icon-diagonal-arrow', 'flat-icon-blueprint', 'flat-icon-renovation', 'flat-icon-building', 'flat-icon-interior-design', 'flat-icon-quality', 'flat-icon-worker', 'flat-icon-check', 'flat-icon-unfold', 'flat-icon-project-management', 'flat-icon-management', 'flat-icon-satisfaction', 'flat-icon-process', 'flat-icon-help', 'flat-icon-blueprint-1', 'flat-icon-play-button', 'flat-icon-3d-model', 'flat-icon-livingroom', 'flat-icon-laser-cutting-machine', 'flat-icon-renovation-1', 'flat-icon-3d', 'flat-icon-brickwall', 'flat-icon-color-adjustment', 'flat-icon-roof', 'flat-icon-worker-1', 'flat-icon-broken-house', 'flat-icon-solar-system', 'flat-icon-review', 'flat-icon-bed', 'flat-icon-relax', 'flat-icon-kitchen', 'flat-icon-electric-panel', 'flat-icon-heater', 'flat-icon-lamp', 'flat-icon-vimeo', 'flat-icon-facebook', 'flat-icon-instagram', 'flat-icon-twitter', 'flat-icon-youtube', 'flat-icon-location', 'flat-icon-message', 'flat-icon-mail', 'flat-icon-search', 'flat-icon-shopping-cart', 'flat-icon-down-arrow', 'flat-icon-share', 'flat-icon-tick', 'flat-icon-user', 'flat-icon-phone-call', 'flat-icon-view', 'flat-icon-tag', 'flat-icon-clock', 'flat-icon-heart', 'flat-icon-badge', 'flat-icon-solution', 'flat-icon-menu', ); $tabs['tp-flaticon-icons'] = array( 'name' => 'tp-flaticon-icons', 'label' => esc_html__('TP - Flaticons', 'tpcore'), 'labelIcon' => 'tp-icon', 'prefix' => '', 'displayPrefix' => 'tp', 'url' => TPCORE_ADDONS_URL . 'assets/css/flaticon.css', 'icons' => $flat_icons, 'ver' => '1.0.0', ); $fontawesome_icons = array( 'angle-up', 'check', 'times', 'calendar', 'language', 'shopping-cart', 'bars', 'search', 'map-marker', 'arrow-right', 'arrow-left', 'arrow-up', 'arrow-down', 'angle-right', 'angle-left', 'angle-up', 'angle-down', 'phone', 'users', 'user', 'map-marked-alt', 'trophy-alt', 'envelope', 'marker', 'globe', 'broom', 'home', 'bed', 'chair', 'bath', 'tree', 'laptop-code', 'cube', 'cog', 'play', 'trophy-alt', 'heart', 'truck', 'user-circle', 'map-marker-alt', 'comments', 'award', 'bell', 'book-alt', 'book-open', 'book-reader', 'graduation-cap', 'laptop-code', 'music', 'ruler-triangle', 'user-graduate', 'microscope', 'glasses-alt', 'theater-masks', 'atom' ); $tabs['tp-fontawesome-icons'] = array( 'name' => 'tp-fontawesome-icons', 'label' => esc_html__('TP - Fontawesome Pro Light', 'tpcore'), 'labelIcon' => 'tp-icon', 'prefix' => 'fa-', 'displayPrefix' => 'fal', 'url' => TPCORE_ADDONS_URL . 'assets/css/fontawesome-all.min.css', 'icons' => $fontawesome_icons, 'ver' => '1.0.0', ); return $tabs; } /** * Plugin class constructor * * Register plugin action hooks and filters * * @since 1.2.0 * @access public */ public function __construct() { // Register widget scripts add_action( 'elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ] ); // Register widgets add_action( 'elementor/widgets/register', [ $this, 'register_widgets' ] ); // Register editor scripts add_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'editor_scripts' ] ); add_action('elementor/elements/categories_registered', [$this, 'tp_core_elementor_category']); // Register custom controls add_action('elementor/controls/controls_registered', [$this, 'register_controls']); add_action('elementor/controls/register_style_controls', [$this, 'register_style_rols']); add_filter('elementor/icons_manager/additional_tabs', [$this, 'tp_add_custom_icons_tab']); // $this->tp_add_custom_icons_tab(); add_action('elementor/editor/after_enqueue_scripts', [$this, 'tp_enqueue_editor_scripts'] ); // $this->add_page_settings_controls(); } } // Instantiate Plugin Class TP_Core_Plugin::instance();