Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook can be used to get a list of all form string settings.
Usage
add_filter( 'frm_form_strings', 'add_form_strings' );
Parameters
- $strings (array)
- $form (object)
Examples
Set strings to be translatable
This example will set the strings to be translatable by multilingual plugins.
add_filter( 'frm_form_strings', 'add_form_strings', 10, 2 );
function add_form_strings( $strings, $form ) {
// Add edit and delete options.
if ( $form->editable ) {
$strings[] = 'edit_value';
$strings[] = 'edit_msg';
}
$strings[] = 'prev_value';
if ( isset( $form->options['rootline_titles_on'] ) && ! empty( $form->options['rootline_titles_on'] ) ) {
$strings[] = 'rootline_titles';
}
return $strings;
}