PATH:
home
/
thebhoeo
/
.trash
/
woodmart
/
inc
/
integrations
/
elementor
/
elements
<?php /** * Page title map. * * @package Woodmart */ namespace XTS\Modules\Layouts; use Elementor\Widget_Base; use Elementor\Controls_Manager; use Elementor\Plugin; use XTS\Modules\Layouts\Global_Data as Builder_Data; if ( ! defined( 'ABSPATH' ) ) { exit; // Direct access not allowed. } /** * Elementor widget that inserts an embeddable content into the page, from any given URL. */ class Page_Title extends Widget_Base { /** * Get widget name. * * @return string Widget name. */ public function get_name() { return 'wd_page_title'; } /** * Get widget title. * * @return string Widget title. */ public function get_title() { return esc_html__( 'Page title', 'woodmart' ); } /** * Get widget icon. * * @return string Widget icon. */ public function get_icon() { return 'wd-icon-wc-page-title'; } /** * Get widget categories. * * @return array Widget categories. */ public function get_categories() { return array( 'wd-site-elements' ); } /** * Register the widget controls. */ protected function register_controls() { /** * Style settings. */ $this->start_controls_section( 'general_style_section', array( 'label' => esc_html__( 'General', 'woodmart' ), 'tab' => Controls_Manager::TAB_STYLE, ) ); $this->add_control( 'css_classes', array( 'type' => 'wd_css_class', 'default' => 'wd-page-title-el', 'prefix_class' => '', ) ); $this->add_control( 'full_width', array( 'label' => esc_html__( 'Full width', 'woodmart' ), 'type' => Controls_Manager::SWITCHER, 'default' => '', ) ); $this->end_controls_section(); } /** * Render the widget output on the frontend. */ protected function render() { $settings = wp_parse_args( $this->get_settings_for_display(), array( 'enable_title' => 'yes', 'enable_breadcrumbs' => 'yes', 'enable_categories' => 'yes', 'full_width' => '', ) ); $title_classes = ''; if ( $settings['full_width'] ) { $title_classes .= ' wd-section-stretch'; } Builder_Data::get_instance()->set_data( 'builder', true ); Builder_Data::get_instance()->set_data( 'title_classes', $title_classes ); Builder_Data::get_instance()->set_data( 'is_post_layout', Main::get_instance()->has_custom_layout( 'single_post' ) ); Builder_Data::get_instance()->set_data( 'layout_id', get_the_ID() ); Main::setup_preview(); woodmart_enqueue_inline_style( 'el-page-title-builder' ); if ( woodmart_woocommerce_installed() && ( is_product_taxonomy() || woodmart_is_shop_archive() ) ) { woodmart_enqueue_inline_style( 'woo-shop-page-title' ); if ( ! woodmart_get_opt( 'shop_title' ) ) { woodmart_enqueue_inline_style( 'woo-shop-opt-without-title' ); } if ( woodmart_get_opt( 'shop_categories' ) ) { woodmart_enqueue_inline_style( 'shop-title-categories' ); woodmart_enqueue_inline_style( 'woo-categories-loop-nav-mobile-accordion' ); } } woodmart_page_title(); Main::restore_preview(); } } Plugin::instance()->widgets_manager->register( new Page_Title() );
[-] class-widget-products.php
[edit]
[-] class-countdown.php
[edit]
[-] class-off-canvas-column-btn.php
[edit]
[-] class-video.php
[edit]
[-] class-author-area.php
[edit]
[+]
banner
[-] class-text-block.php
[edit]
[-] class-product-filters.php
[edit]
[-] class-timeline.php
[edit]
[+]
blog
[-] class-testimonials.php
[edit]
[-] class-size-guide.php
[edit]
[-] class-google-map.php
[edit]
[-] class-title.php
[edit]
[-] class-image-hotspot.php
[edit]
[-] class-mailchimp.php
[edit]
[-] class-page-title.php
[edit]
[-] class-page-heading.php
[edit]
[-] class-product-categories.php
[edit]
[-] class-compare-images.php
[edit]
[-] class-nested-carousel.php
[edit]
[-] class-table.php
[edit]
[-] class-team-member.php
[edit]
[-] class-3d-view.php
[edit]
[-] class-products-brands.php
[edit]
[-] class-slider.php
[edit]
[+]
products
[-] class-image.php
[edit]
[-] class-sidebar.php
[edit]
[-] class-tabs.php
[edit]
[-] class-counter.php
[edit]
[-] class-accordion.php
[edit]
[-] class-open-street-map.php
[edit]
[-] class-wishlist.php
[edit]
[-] class-search.php
[edit]
[+]
..
[-] class-social.php
[edit]
[+]
infobox
[-] class-toggle.php
[edit]
[-] class-contact-form-7.php
[edit]
[-] class-menu-anchor.php
[edit]
[+]
instagram
[-] class-menu-price.php
[edit]
[-] class-breadcrumbs.php
[edit]
[-] class-list.php
[edit]
[+]
products-tabs
[-] class-popup.php
[edit]
[-] class-mega-menu.php
[edit]
[-] class-extra-menu-list.php
[edit]
[+]
portfolio
[-] class-pricing-tables.php
[edit]
[-] class-marquee.php
[edit]
[-] class-twitter.php
[edit]
[-] class-compare.php
[edit]
[-] class-images-gallery.php
[edit]
[+]
button