Description
Filters the form rows before they are put together for the form.
Parameters
$rows
(array) (required) An array of the forms row elements. Each row element will include the following keys:
- row_before – HTML tags before the row
- label – HTML label tag
- field_before – HTML tags before the field input tag
- field – HTML input
- field_after – HTML tags after the field input tag
- row_after – HTML tags after the row
$action
(string) (optional) Indicates the form that is being displayed (login|pwdreset|pwdchange|getusername).
$arr
(array) (optional) Array containing all of the form settings (what can be filtered with wpmem_login_form_args)
Changelog
Introduced in version 2.9.0
Added $arr parameter in version 3.2.6
Source
wpmem_login_form_rows is located in inc/class-wp-members-forms.php
Usage
add_filter( 'wpmem_login_form_rows', 'my_login_form_rows_filter', 10, 2 ); function my_login_form_rows_filter( $rows, $action ) { /** Form rows are assembled as an array and the array is passed through this filter. The rows will be numerical array keys (defaults: 0 & 1). [0] => Array ( [row_before] => [label] => <label for="fieldname">Field Name</label> [field_before] => <div class="div_text"> [field] => <input name="fieldname" type="text" id="fieldname" value="" class="class" /> [field_after] => </div> [row_after] => ) */ return $rows; }
Code Snippet Library [Subscriber Content]
- Display form rows in columns
- Add reCAPTCHA to the Login Form
- Replace form label tags with input tag placeholders
- Add Really Simple CAPTCHA to the Login Form
See a list of all filter and action hooks
Welcome to RocketGeek Interactive › Forums › Plugins › WP-Members › WP-Members Documentation › Filter and Action Hooks › wpmem_login_form_rows