gform_honeypot_labels_pre_render

gform_honeypot_labels_pre_render

DescriptionUsageParametersExamples1. Four new labelsPlacementSinceSource Code

Description
The gform_honeypot_labels_pre_render filter can be used to override the labels used when rendering the hidden honeypot field.
Usage
The filter which would run for all forms would be used like so:
add_filter( 'gform_honeypot_labels_pre_render', 'your_function_name' );

Parameters

$honeypot_labels array
The honeypot field labels.

Examples
1. Four new labels
This example shows how you can override the four default labels with your own custom labels.
add_filter( 'gform_honeypot_labels_pre_render', function ( $honeypot_labels ) {
return array( 'One', 'Two', 'Three', 'Four' );
} );

Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in Gravity Forms 2.0.7.16.
Source Code
This filter is located in GFFormDisplay::get_honeypot_labels() in form_display.php

發表回覆

您的郵箱地址不會被公開。 必填項已用 * 標註