<? php bp_activity_id ()?> in buddypress, anyone to scratch?

I have been trying to deal with this problem for the last few days, here is an overview of my problem related to

<?php bp_activity_id() ?> 

I have 2 comment forms for the gallery plugin in the friend press, the first appears if there are no comments and it β€œcreates” its action, the second form appears if the comment has ever been made and has <?php bp_activity_id() ?> attached it to him.

I would like to know how to automatically create an activity element, since the first form cannot use functions such as a favorite or something, since there is no identifier for communication. I would like the 2nd form to be filled with an identifier or in the worst case, is it possible that some jquery / javascript automatically adds a comment and deletes it ONCE (only once), so there is an identifier? I can find more information, if necessary, anyone will really appreciate any help!

+6
source share
1 answer
 $newActivity = bp_activity_add($args); // you dont NEED args, but you can pass them. // $newActivity = the new activity ID. 

Source: http://www.buddydex.info/buddypress/bp-activity/bp_activity_add/

+3
source

Source: https://habr.com/ru/post/904775/


All Articles