Skip to content

Commit d963f3d

Browse files
authored
Revert "Check if label is set"
1 parent 533d297 commit d963f3d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/class.settings-api.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,12 @@ function admin_init() {
120120
foreach ( $field as $option ) {
121121

122122
$type = isset( $option['type'] ) ? $option['type'] : 'text';
123-
$label = isset( $option['label'] ) ? $option['label'] : '';
124123

125124
$args = array(
126125
'id' => $option['name'],
127126
'label_for' => $args['label_for'] = "{$section}[{$option['name']}]",
128127
'desc' => isset( $option['desc'] ) ? $option['desc'] : '',
129-
'name' => $label,
128+
'name' => $option['label'],
130129
'section' => $section,
131130
'size' => isset( $option['size'] ) ? $option['size'] : null,
132131
'options' => isset( $option['options'] ) ? $option['options'] : '',
@@ -139,7 +138,7 @@ function admin_init() {
139138
'step' => isset( $option['step'] ) ? $option['step'] : '',
140139
);
141140

142-
add_settings_field( $section . '[' . $option['name'] . ']', $label, (isset($option['callback']) ? $option['callback'] : array($this, 'callback_' . $type )), $section, $section, $args );
141+
add_settings_field( $section . '[' . $option['name'] . ']', $option['label'], (isset($option['callback']) ? $option['callback'] : array($this, 'callback_' . $type )), $section, $section, $args );
143142
}
144143
}
145144

0 commit comments

Comments
 (0)