Group::label()

Description #

Output label of field.

Source #

File: lib/form/class-group.php

	public function label() {
		$this->add_html( '<label class="ap-form-label" for="' . sanitize_html_class( $this->field_name ) . '">' . esc_html( $this->get( 'label' ) ) );

		// Shows delete button for repeatable fields.
		if ( true === $this->get( 'delete_button', false ) ) {
			$this->add_html( '<button class="ap-btn ap-repeatable-delete">' . __( 'Delete', 'anspress-question-answer' ) . '</button>' );
		}

		$this->add_html( '</label>' );
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment