$group_id
第一个参数是否传递给groups_join_group
动作挂钩函数,第二个参数是$user_id
. 您可以使用这些数据获取组creator_id
例如:
add_action(\'groups_join_group\', \'my_groups_join_group_action\', 10, 2);
function my_groups_join_group_action($group_id, $user_id) {
// use $group_id and $user_id here:
$group = groups_get_group( array( \'group_id\' => $group_id ) );
$creator_id = $group->creator_id;
}