Add rule for concatenation operator spacing
[MAILPOET-2090]
This commit is contained in:
@ -39,14 +39,14 @@ abstract class Base {
|
||||
}
|
||||
|
||||
if (in_array($block['type'], ['radio', 'checkbox'])) {
|
||||
$rules['group'] = 'custom_field_'.$block['id'];
|
||||
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
|
||||
$rules['group'] = 'custom_field_' . $block['id'];
|
||||
$rules['errors-container'] = '.mailpoet_error_' . $block['id'];
|
||||
$rules['required-message'] = WPFunctions::get()->__('Please select at least one option', 'mailpoet');
|
||||
}
|
||||
|
||||
if ($block['type'] === 'date') {
|
||||
$rules['group'] = 'custom_field_'.$block['id'];
|
||||
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
|
||||
$rules['group'] = 'custom_field_' . $block['id'];
|
||||
$rules['errors-container'] = '.mailpoet_error_' . $block['id'];
|
||||
}
|
||||
|
||||
$validation = [];
|
||||
@ -59,7 +59,7 @@ abstract class Base {
|
||||
if (is_bool($value)) {
|
||||
$value = ($value) ? 'true' : 'false';
|
||||
}
|
||||
$validation[] = 'data-parsley-'.$rule.'="'.$value.'"';
|
||||
$validation[] = 'data-parsley-' . $rule . '="' . $value . '"';
|
||||
}
|
||||
}
|
||||
return join(' ', $validation);
|
||||
@ -75,7 +75,7 @@ abstract class Base {
|
||||
}
|
||||
if (isset($block['params']['label'])
|
||||
&& strlen(trim($block['params']['label'])) > 0) {
|
||||
$html .= '<label class="mailpoet_'.$block['type'].'_label">';
|
||||
$html .= '<label class="mailpoet_' . $block['type'] . '_label">';
|
||||
$html .= htmlspecialchars($block['params']['label']);
|
||||
|
||||
if (isset($block['params']['required']) && $block['params']['required']) {
|
||||
@ -109,7 +109,7 @@ abstract class Base {
|
||||
// return field name depending on block data
|
||||
protected static function getFieldName($block = []) {
|
||||
if ((int)$block['id'] > 0) {
|
||||
return 'cf_'.$block['id'];
|
||||
return 'cf_' . $block['id'];
|
||||
} else {
|
||||
$obfuscator = new FieldNameObfuscator();
|
||||
return $obfuscator->obfuscate($block['id']);//obfuscate field name for spambots
|
||||
|
Reference in New Issue
Block a user