Skip to content

Commit

Permalink
Fix: Separate "Default" and "None" values in "Border Type" [ED-8511] (#…
Browse files Browse the repository at this point in the history
…20145)

## PR Checklist
<!-- 
Please check if your PR fulfills the following requirements:
**Filling out the template is required.** Any pull request that does not
include enough information to be reviewed in a timely manner may be
closed at the maintainers' discretion.
 -->
- [x] The commit message follows our guidelines:
https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md


## PR Type
What kind of change does this PR introduce?
<!-- Please check the one that applies to this PR using "x" with no
spaces eg: [x]. -->
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## Summary

This PR can be summarized in the following changelog entry:

* Fix: Separate "Default" and "None" values in "Border Type"

## Description
An explanation of what is done in this PR

* This PR fixes several bug. It changes the initial label to "Default".
In addition it adds the ability to set border none.

## Test instructions
This PR can be tested by following these steps:

*

## Quality assurance

- [x] I have tested this code to the best of my abilities
- [ ] I have added unittests to verify the code works as intended
- [ ] Docs have been added / updated (for bug fixes / features)

Fixes: #11565, #13328, #11723
  • Loading branch information
ramiy committed Oct 27, 2022
1 parent 03639f0 commit 411e865
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions includes/controls/groups/border.php
Expand Up @@ -60,7 +60,8 @@ protected function init_fields() {
'label' => _x( 'Border Type', 'Border Control', 'elementor' ),
'type' => Controls_Manager::SELECT,
'options' => [
'' => esc_html__( 'None', 'elementor' ),
'' => esc_html__( 'Default', 'elementor' ),
'none' => esc_html__( 'None', 'elementor' ),
'solid' => _x( 'Solid', 'Border Control', 'elementor' ),
'double' => _x( 'Double', 'Border Control', 'elementor' ),
'dotted' => _x( 'Dotted', 'Border Control', 'elementor' ),
Expand All @@ -79,7 +80,7 @@ protected function init_fields() {
'{{SELECTOR}}' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
],
'condition' => [
'border!' => '',
'border!' => [ '', 'none' ],
],
'responsive' => true,
];
Expand All @@ -92,7 +93,7 @@ protected function init_fields() {
'{{SELECTOR}}' => 'border-color: {{VALUE}};',
],
'condition' => [
'border!' => '',
'border!' => [ '', 'none' ],
],
];

Expand Down

0 comments on commit 411e865

Please sign in to comment.