You are here

function heartbeat_plugins_preprocess_heartbeat_buttons in Heartbeat 7

Preprocess function for the heartbeat activity buttons.

File

modules/heartbeat_plugins/heartbeat_plugins.module, line 442

Code

function heartbeat_plugins_preprocess_heartbeat_buttons(&$variables) {
  $pluginAttachments = isset($variables['heartbeat_activity']->additions->plugins) ? $variables['heartbeat_activity']->additions->plugins : array();
  foreach ($pluginAttachments as $pluginId => $plugin) {
    if ($plugin
      ->hasAttachmentsButtons()) {
      $plugin
        ->renderButtons($variables['heartbeat_activity']);
    }
  }
}