bookmark_bordergform_gfuser_object_init

Description

Fires on the feed configuration page after the DOM has been loaded and the GFUser javascript object has been initialized.

Removed: This hook was removed in version 3.0 with no replacement.

Usage

<script type="text/javascript">
    jQuery(document).bind('gform_gfuser_object_init', function(){

        // code to fire once the GFUser object has been initialized goes here

    });
</script>

Parameters

No parameters are passed to this event; however, it is useful to note that the GFUser object is a global namespace and properties can be safely added to it from this event.

Examples

This event is useful when wishing to add or modify values in the GFUser object. In the below example you can see how to add two values to the GFUser object and then call another function that process these new properties.

<script type="text/javascript">
    jQuery(document).bind('gform_gfuser_object_init', function(){

        // add buddypress properties to GFUser object
        GFUser.buddypress_meta = <?php echo (!empty($config&#91;'meta'&#93;&#91;'buddypress_meta'&#93;)) ? GFCommon::json_encode($config&#91;'meta'&#93;&#91;'buddypress_meta'&#93;) : "&#91;new BuddyPressMetaOption()&#93;"; ?>;
        GFUser.buddypress_options = <?php echo GFCommon::json_encode(self::get_buddypress_fields()); ?>;

        CreateBuddyPressMetaOptions();

    });
</script>

Source Code

This filter is located in userregistration.php