So we've added some new hooks to Activity 2 and here is a patch that documents them.

There is one last one that needs an example written, hook_activity_access_records_alter()

CommentFileSizeAuthor
activity_new-hook-docs.patch3.81 KBsirkitree

Comments

Scott Reynolds’s picture

been meaning to look at this and i keep forgetting. Bumping this up in my issue queue

Scott Reynolds’s picture

So an example of hook_activity_access_records_alter().

/**
  * Implementation of hook_activity_access_records_alter().
  */
  function example_activity_access_records_alter(&$grants, $context) {
    foreach ($grants as $module => $value) {
       if ($module != 'og') {
           unset($grants[$module]);
       }
    }    
  }

This example removes any access records except og. Prevents friend modules from providing access.

sirkitree’s picture

Status: Needs work » Fixed

Thanks Scott. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.