Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: buddypress-skeleton-component – saving to database?


thekmen
Participant

@thekmen

ok, to update a database table on ajax updates, I think I need to add the action to ‘wp’, something like:

function data_to_add() {
global $bp;

if ( !is_user_logged_in() || $bp->current_component != $bp->activity->slug || $bp->current_action != 'post')
return false;

check_admin_referer( 'post_update', '_wpnonce_post_update' );

add_my_data('100', '200','6');
}

add_action('wp','data_to_add', 3);

however, it still doesn’t work. any ideas?
@DJPaul maybe you would know? how are you doing it with your new version of the achievments plugin?

Skip to toolbar