LLMS_Form_Field::get_label_html()
Retrieve the HTML for the fields label.
Return Return
(string)
Source Source
File: includes/forms/class-llms-form-field.php
protected function get_label_html() { if ( empty( $this->settings['label'] ) && ! $this->settings['label_show_empty'] ) { return ''; } $required = ''; if ( $this->settings['required'] ) { /** * Customize the character used to denote a required field * * @since Unknown. * * @param string $character The character used to denote a required field. Defaults to "*" (an asterisk). * @param array $settings Associative array of field settings. */ $char = apply_filters( 'lifterlms_form_field_required_character', '*', $this->settings ); $required = sprintf( '<span class="llms-required">%s</span>', $char ); } return sprintf( '<label for="%1$s">%2$s%3$s</label>', esc_attr( $this->settings['id'] ), $this->settings['label'], $required ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |