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.
Return Return
(string)
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>'; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |