PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.8.6
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.8.6
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 4 years ago archive-title.php 1 year ago
archive-title.php
138 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 'elementor%s-align-', '',
53 [
54 '{{WRAPPER}} .shopengine-archive-title' => 'text-align: {{VALUE}}',
55 '.rtl {{WRAPPER}}.elementor-align-left .shopengine-archive-title' => 'text-align: right;',
56 '.rtl {{WRAPPER}}.elementor-align-right .shopengine-archive-title' => 'text-align: left;',
57 ],
58 )
59 );
60
61 $this->add_control(
62 'shopengine_archive_title_archive_title_color',
63 [
64 'label' => esc_html__('Color', 'shopengine'),
65 'type' => Controls_Manager::COLOR,
66 'alpha' => false,
67 'default' => '#101010',
68 'selectors' => [
69 '{{WRAPPER}} .archive-title' => 'color: {{VALUE}};',
70 ],
71 ]
72 );
73
74 $this->add_group_control(
75 Group_Control_Typography::get_type(),
76 array(
77 'name' => 'shopengine_archive_title_typography',
78 'label' => esc_html__('Typography', 'shopengine'),
79 'selector' => '{{WRAPPER}} .archive-title',
80 'exclude' => ['font_style', 'text_decoration', 'letter_spacing'],
81 'fields_options' => [
82 'typography' => [
83 'default' => 'custom',
84 ],
85 'font_weight' => [
86 'default' => '700',
87 ],
88 'font_size' => [
89 'label' => esc_html__('Font Size (px)', 'shopengine'),
90 'default' => [
91 'size' => '24',
92 'unit' => 'px'
93 ],
94 'size_units' => ['px'],
95 ],
96 'text_transform' => [
97 'default' => 'uppercase',
98 ],
99
100 'line_height' => [
101 'size_units' => ['px'],
102 'label' => 'Line-height (px)',
103 ]
104
105 ],
106 )
107 );
108
109 $this->end_controls_section();
110 }
111
112 protected function screen() {
113
114 $settings = $this->get_settings_for_display();
115 $options_heading_title_tag = array_keys(
116 [
117 'h1' => 'H1',
118 'h2' => 'H2',
119 'h3' => 'H3',
120 'h4' => 'H4',
121 'h5' => 'H5',
122 'h6' => 'H6',
123 'div' => 'div',
124 'span' => 'span',
125 'p' => 'p',
126 ]
127 );
128 $title_tag = isset($settings['shopengine_archive_title_header_size'])
129 ? \ShopEngine\Utils\Helper::esc_options($settings['shopengine_archive_title_header_size'], $options_heading_title_tag, 'h1')
130 : 'h1';
131 echo sprintf(
132 '<div class="shopengine-archive-title"><%1$s class="archive-title">%2$s</%1$s></div>',
133 esc_html( $title_tag ),
134 esc_html(woocommerce_page_title(false))
135 );
136 }
137 }
138