Site icon Hip-Hop Website Design and Development

How does adding custom meta to signup form work?

Following along with the answer posted here,

How to add Custom Blog Options to new blog setup form?

I am attempting to understand why the custom meta is added to the options table for the blog as long as I do not let the update_blog_option() run. I added echos and an exit() before that function to be sure the values were correct, and it populated the correct value in the options table. But when I remove the exit() and let it run through, it does NOT populate.

The code in question is,

add_action('wpmu_new_blog', 'process_extra_field_on_blog_signup', 10, 6);
function process_extra_field_on_blog_signup($blog_id, $user_id, $domain, $path, $site_id,     $meta) {
update_blog_option($blog_id, 'extra_field', $meta['extra_field']);
}

Additionally, what exactly does the table wp_signups do? Is it a temporary holding location for signups until activated? And does that data get passed to the blog once activated? In which case, the meta that is stored there would get passed anyway right?

The code used to add the custom meta is,

add_filter('add_signup_meta', 'append_extra_field_as_meta');
function append_extra_field_as_meta($meta) {
if(isset($_REQUEST['extra_field'])) {
    $meta['extra_field'] = $_REQUEST['extra_field'];
}
return $meta;
}

And that is getting stored proper in the wp_signups table.

Thank you for your help.