-
Notifications
You must be signed in to change notification settings - Fork 12
Hooks
Felipe Elia edited this page Jul 23, 2023
·
5 revisions
The available filters are:
Filters the add button attributes.
Parameters:
-
$attributes
: Array of attributes for the add button. Keys:-
group_id
: group ID -
additional_classes
: css class(es) to add to the button -
text
: text used for the button
-
Return value: array of button attributes
Example
// In your theme's functions.php
function customize_add_button_atts( $attributes ) {
return array_merge( $attributes, [ 'text' => 'Add Entry' ] );
}
add_filter( 'wpcf7_field_group_add_button_atts', 'customize_add_button_atts' );
Filters the add button HTML.
Parameters:
-
$html
: Default add button HTML -
$group_id
: The group ID
Return value: button HTML
Filters the remove button attributes.
Parameters:
-
$attributes
: Array of attributes for the remove button. Keys:-
group_id
: group ID -
additional_classes
: css class(es) to add to the button -
text
: text used for the button
-
Return value: array of button attributes
Filters the remove button HTML.
Parameters:
-
$html
: Default remove button HTML -
$group_id
: The group ID
Return value: button HTML