Skip to content

Commit

Permalink
Merge pull request #247 from davseve/ED-11967-to-main
Browse files Browse the repository at this point in the history
Merge branch 'main' into ED-11967-to-main
  • Loading branch information
davseve authored Sep 7, 2023
2 parents 25fbdd0 + 1fe84c6 commit bfb1b85
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
uses: actions/checkout@v3
with:
ref: main
- name: Get Lables
run: |
echo "LABELS: ${{ github.event.pull_request.labels }}"
x=${{ toJson(github.event.pull_request.labels.*.name) }}
echo "Labels 2 is $x"
- name: Get Configuration
id: configuration
uses: rgarcia-phi/json-to-variables@9835d537368468c4e4de5254dc3efeadda183793
Expand Down
48 changes: 48 additions & 0 deletions includes/widgets/rating.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,53 @@ private function add_style_tab() {
]
);

$this->add_responsive_control(
'icon_gap',
[
'label' => esc_html__( 'Spacing', 'elementor' ),
'type' => Controls_Manager::SLIDER,
'range' => [
'em' => [
'min' => 0,
'max' => 10,
'step' => 0.1,
],
'rem' => [
'min' => 0,
'max' => 10,
'step' => 0.1,
],
],
'size_units' => [ 'px', 'em', 'rem', 'vw', 'custom' ],
'selectors' => [
'{{WRAPPER}}' => '--e-rating-gap: {{SIZE}}{{UNIT}}',
],
]
);

$this->add_control(
'icon_color',
[
'label' => esc_html__( 'Color', 'elementor' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--e-rating-star-marked-color: {{VALUE}}',
],
'separator' => 'before',
]
);

$this->add_control(
'icon_unmasked_color',
[
'label' => esc_html__( 'Unmarked Color', 'elementor' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}}' => '--e-rating-star-color: {{VALUE}}',
],
]
);

$this->end_controls_section();
}

Expand Down Expand Up @@ -236,6 +283,7 @@ protected function get_icon_marked_width( $icon_index ): string {

if ( $rating_value >= $icon_index ) {
$width = '100%';

} elseif ( intval( ceil( $rating_value ) ) === $icon_index ) {
$width = ( $rating_value - ( $icon_index - 1 ) ) * 100 . '%';
}
Expand Down

0 comments on commit bfb1b85

Please sign in to comment.