Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Forms_Dynamic_Fields::get_toggle_button_html( string $fields, string $field_label )

Retrieve the HTML for a field toggle button link


Parameters Parameters

$fields

(string) (Required) A comma-separated list of selectors for the controlled fields.

$field_label

(string) (Required) Label for the original field.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/forms/class-llms-forms-dynamic-fields.php

	private function get_toggle_button_html( $fields, $field_label ) {

		// Translator: %s = user-selected label for the given field being toggled.
		$change_text = sprintf( esc_attr_x( 'Change %s', 'Toggle button for changing email or password', 'lifterlms' ), $field_label );
		$cancel_text = esc_attr_x( 'Cancel', 'Cancel password or email address change button text', 'lifterlms' );

		return '<a class="llms-toggle-fields" data-fields="' . $fields . '" data-change-text="' . $change_text . '" data-cancel-text="' . $cancel_text . '" href="#">' . $change_text . '</a>';

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.