Hi Carl,
I tried to implement the specific action, however it seems that it does not return the $entry object. As you see in the code below, I am iring the action (gform_post_submission) after the action (bp_artwork_submit_content) that actually submits the form.
function bp_artwork_submit() {
global $bp;
do_action( 'bp_artwork_submit' );
add_action( 'bp_template_title', 'bp_artwork_submit_title' );
add_action( 'bp_template_content', 'bp_artwork_submit_content' );
add_action('gform_post_submission', 'get_post_submit_info_to_activity', 10, 2);
bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
}
The PHP code itself that should get the object is:
function get_post_submit_info_to_activity($entry, $form){
global $bp, $entry;
//getting post
$post_submit_info = array(
'action' => 'submitted an artwork',
'type' => 'artwork_submission',
'user_id' => $bp->loggedin_user->id,
);
bp_artwork_record_activity($post_submit_info);
}
The problem is that I can not get any values out of the $entry array. Can this be related to the redirection after posting the form?
Posted 13 years ago on Sunday April 10, 2011 |
Permalink