Skip to content

Commit 4fbad5c

Browse files
committed
Update Latest-Posts-Hover.php
1 parent 7b7aa86 commit 4fbad5c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

widgets/Latest-Posts-Hover.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,21 @@ protected function _register_controls()
7474
'label' => esc_html__('Background color', 'Latest-Posts-Hover'),
7575
'type' => \Elementor\Controls_Manager::COLOR,
7676
'default' => '#f8f8f8',
77+
'selectors' => [
78+
'{{WRAPPER}} .info' => 'background-color:{{VALUE}}!important;',
79+
],
7780
]
7881
);
7982
$this->add_control(
8083
'card_opacity',
8184
[
8285
'label' => esc_html__('Card opacity', 'Latest-Posts-Hover'),
8386
'type' => \Elementor\Controls_Manager::NUMBER,
84-
'default' => 0.8,
8587
'min' => 0,
8688
'max' => 1,
8789
'step' => 0.1,
8890
'selectors' => [
89-
'{{WRAPPER}} .info' => 'filter:{{VALUE}}!important;',
91+
'{{WRAPPER}} .info' => 'filter:opacity({{VALUE}})!important;',
9092
],
9193
]
9294
);
@@ -1095,7 +1097,6 @@ protected function render()
10951097

10961098
}
10971099
$posts = get_posts($args);
1098-
$cardColor = $settings['card_color'];
10991100
$wordPc = $settings['content_word_pc'];
11001101
$wordMobile = $settings['content_word_mobile'];
11011102
$place=$settings['Search_place'];
@@ -1390,7 +1391,7 @@ protected function render()
13901391
overflow: hidden;
13911392
width: ' . $width . '%;
13921393
margin-bottom: 20px;
1393-
background-position: center center;
1394+
background-position: center;
13941395
background-size: cover;
13951396
cursor: pointer;
13961397

0 commit comments

Comments
 (0)