Another plugin I am using (that moves images to Amazon S3) is hooking into the ‘wp_update_attachment_metadata’ filter. This works quite well but probably is a bit quick and dirty.
The plugin doesn’t work (I’m using WP 2.8.6) because the invitation code isn’t passed as a field in the second form at registration. This can easily be done:
- In the initialization routine, add
add_action( 'signup_hidden_fields', array( &$this, 'add_hidden_field_to_signup' ) );
- Add the following function:
function add_hidden_field_to_signup( $errors ) {
?>
<input type="hidden" name="invitation_code" value="<?php echo wp_specialchars( $_POST['invitation_code'], 1 ) ?>" />
<?php }