Skip to content

Commit

Permalink
Remove letter-spacing from required check
Browse files Browse the repository at this point in the history
If letter-spacing was empty, it send 0 for default letter-spacing.
  • Loading branch information
parhumm committed Jan 4, 2015
1 parent d1f9f7a commit ee45502
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions acf-typography-v5.php
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ function validate_value( $valid, $value, $field, $input ){

if (empty($value['font-family']) || empty($value['font-weight']) || empty($value['backupfont']) || empty($value['text_align'])
|| empty($value['direction']) || empty($value['font_style']) || empty($value['font_size']) || empty($value['line_height'])
|| empty($value['letter_spacing']) || empty($value['text-color'])) {
|| empty($value['text-color'])) {
$set = 0;
$txt = __('The value is empty!! : ','acf-typography');

Expand Down Expand Up @@ -776,15 +776,12 @@ function validate_value( $valid, $value, $field, $input ){
$txt .= __('line height, ','acf-typography');
$set = 1;
}

if( empty($value['letter_spacing']) & $field['show_letter_spacing']){
$txt .= __('letter spacing, ','acf-typography');
$set = 1;
}

if( empty($value['text-color']) & $field['show_color_picker']){
$txt .= __('text color, ','acf-typography');
$set = 1;
}

if ($set) {
$valid = $txt;
}
Expand Down

0 comments on commit ee45502

Please # to comment.