bookmark_bordergform_user_registration_new_site_meta

Description

This filter allows the site meta to be modified while creating a new site.

Usage

add_filter( 'gform_user_registration_new_site_meta', 'your_function_name', 10, 6 );

Parameters

  • $site_meta array
    An array of new site arguments (ex. if the site is public => 1)
  • $form Form Object
    The Form Object
  • $entry Entry Object
    The Entry Object
  • $feed Feed Object
    The Feed Object
  • $user_id int
    The ID of the user who creates the site
  • $is_update_feed boolean
    True/false indicator of whether this is a feed to update an existing setup.

Example

add_filter( 'gform_user_registration_new_site_meta', 'add_blog_template', 10, 6 );
function add_blog_template( $site_meta, $form, $entry, $feed, $user_id, $is_update_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::create_site() in gravityformsuserregistration/class-gf-user-registration.php