gform_user_registration_signup_meta

gform_user_registration_signup_meta

DescriptionUsageParametersExamplePlacementSource Code

Description
The 「gform_user_registration_signup_meta」 filter allows the modification of the signup meta data. This filter is used in the User Registration Add-On for Gravity Forms.
Usage
The following would apply to all forms:
add_filter( 'gform_user_registration_signup_meta', 'your_function_name', 10, 4 );

To target a specific form, append the form id to the hook name. (format: gform_user_registration_signup_meta_FORMID)
add_filter( 'gform_user_registration_signup_meta_74', 'your_function_name', 10, 4 );

Parameters

$meta array
All the metadata in an array (user login, email, password, etc.).

$form Form Object
The current Form object.

$entry Entry Object
The Entry object (to pull the meta from the entry array).

$feed Feed Object
The Feed object.

Example
add_filter( 'gform_user_registration_signup_meta', 'add_blog_template', 10, 4 );
function add_blog_template( $signup_meta, $form, $entry, $feed ) {
$signup_meta['blog_template'] = 1;
return $signup_meta;
}

Placement
This code should be placed in the functions.php file of your active theme.
Source Code
This filter is located in GF_User_Registration::handle_user_activation() in gravityformsuserregistration/class-gf-user-registration.php.

發表回覆

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