eventsmanager

Events list group name

Jul 24th, 2014
694
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter('em_event_output_placeholder','my_em_groupname_placeholders',1,3);
  2. function my_em_groupname_placeholders($replace, $EM_Event, $result){
  3. switch( $result ){
  4. case '#_EVENTBPGROUPNAME':
  5. $replace = "";
  6. $groups = groups_get_groups(array('show_hidden'=>true, 'per_page'=>0));
  7. $user_groups = $groups['groups'];
  8. foreach($user_groups as $BP_Group){
  9. if ($BP_Group->id == $EM_Event->group_id){
  10. $replace = $BP_Group->name;
  11. }
  12. }
  13. }
  14. return $replace;
  15. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×