core/Field/Group_Field.php 1 location
|
@@ 157-164 (lines=8) @@
|
154 |
|
* @param string $label If null, the label will be generated from the group name |
155 |
|
* @return Group_Field $this |
156 |
|
*/ |
157 |
|
public function set_label( $label ) { |
158 |
|
if ( is_null( $label ) ) { |
159 |
|
// Try to guess field label from it's name |
160 |
|
$label = Helper::normalize_label( $this->get_name() ); |
161 |
|
} |
162 |
|
$this->label = $label; |
163 |
|
return $this; |
164 |
|
} |
165 |
|
|
166 |
|
/** |
167 |
|
* Label attribute getter. |
core/Field/Field.php 1 location
|
@@ 707-715 (lines=9) @@
|
704 |
|
* @param string $label If null, the label will be generated from the field name |
705 |
|
* @return Field $this |
706 |
|
*/ |
707 |
|
public function set_label( $label ) { |
708 |
|
if ( is_null( $label ) ) { |
709 |
|
// Try to guess field label from it's name |
710 |
|
$label = Helper::normalize_label( $this->get_name() ); |
711 |
|
} |
712 |
|
|
713 |
|
$this->label = $label; |
714 |
|
return $this; |
715 |
|
} |
716 |
|
|
717 |
|
/** |
718 |
|
* Get a key-value array of attributes |