PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 1.0.0
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v1.0.0
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / archive-title / archive-title.php
shopengine / widgets / archive-title Last commit date
archive-title-config.php 5 years ago archive-title.php 5 years ago
archive-title.php
132 lines
1 <?php
2
3 namespace Elementor;
4
5 defined('ABSPATH') || exit;
6
7 use ShopEngine\Widgets\Products;
8
9 class ShopEngine_Archive_Title extends \ShopEngine\Base\Widget
10 {
11
12 public function config() {
13 return new ShopEngine_Archive_Title_Config();
14 }
15
16 protected function register_controls() {
17
18 $this->start_controls_section(
19 'shopengine_section_archive_title_style',
20 array(
21 'label' => esc_html__('Title', 'shopengine'),
22 'tab' => Controls_Manager::TAB_STYLE,
23 )
24 );
25
26 $this->add_control(
27 'shopengine_archive_title_header_size',
28 [
29 'label' => esc_html__('HTML Tag', 'shopengine'),
30 'type' => Controls_Manager::SELECT,
31 'options' => [
32 'h1' => 'H1',
33 'h2' => 'H2',
34 'h3' => 'H3',
35 'h4' => 'H4',
36 'h5' => 'H5',
37 'h6' => 'H6',
38 'div' => 'div',
39 'span' => 'span',
40 'p' => 'p',
41 ],
42 'default' => 'h1',
43 'selectors' => [
44 '{{WRAPPER}} .archive-title' => 'margin: 0; padding: 0;',
45 ],
46 ]
47 );
48
49 $this->add_responsive_control(
50 'shopengine_archive_title_align',
51 \ShopEngine\Utils\Controls_Helper::get_alignment_conf()
52 );
53
54 $this->add_control(
55 'shopengine_archive_title_archive_title_color',
56 [
57 'label' => esc_html__('Color', 'shopengine'),
58 'type' => Controls_Manager::COLOR,
59 'alpha' => false,
60 'default' => '#101010',
61 'selectors' => [
62 '{{WRAPPER}} .archive-title' => 'color: {{VALUE}};',
63 ],
64 ]
65 );
66
67 $this->add_group_control(
68 Group_Control_Typography::get_type(),
69 array(
70 'name' => 'shopengine_archive_title_typography',
71 'label' => esc_html__('Typography', 'shopengine'),
72 'selector' => '{{WRAPPER}} .archive-title',
73 'exclude' => ['font_style', 'text_decoration', 'letter_spacing'],
74 'fields_options' => [
75 'typography' => [
76 'default' => 'custom',
77 ],
78 'font_weight' => [
79 'default' => '700',
80 ],
81 'font_size' => [
82 'label' => esc_html__('Font Size (px)', 'shopengine'),
83 'default' => [
84 'size' => '24',
85 'unit' => 'px'
86 ],
87 'size_units' => ['px'],
88 ],
89 'text_transform' => [
90 'default' => 'uppercase',
91 ],
92
93 'line_height' => [
94 'size_units' => ['px'],
95 'label' => 'Line-height (px)',
96 ]
97
98 ],
99 )
100 );
101
102 $this->end_controls_section();
103
104 }
105
106 protected function screen() {
107
108 $settings = $this->get_settings_for_display();
109 $options_heading_title_tag = array_keys(
110 [
111 'h1' => 'H1',
112 'h2' => 'H2',
113 'h3' => 'H3',
114 'h4' => 'H4',
115 'h5' => 'H5',
116 'h6' => 'H6',
117 'div' => 'div',
118 'span' => 'span',
119 'p' => 'p',
120 ]
121 );
122 $title_tag = \ShopEngine\Utils\Helper::esc_options($settings['shopengine_archive_title_header_size'], $options_heading_title_tag, 'h2');
123
124 echo sprintf(
125 '<div class="shopengine-archive-title"><%1$s class="archive-title">%2$s</%1$s></div>',
126 $title_tag,
127 esc_html(woocommerce_page_title(false))
128 );
129
130 }
131 }
132