You are here

social_post.api.php in Open Social 8.4

Hooks provided by the Social Group module.

File

modules/social_features/social_post/social_post.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the Social Group module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Provide a method to alter the icon and title for post visibility.
 *
 * @param string $visibility
 *   The current field_visibility value, "1" for 'Community' etc.
 *
 * @ingroup social_post_api
 */
function hook_social_post_visibility_info_alter($visibility, &$icon, &$title) {
  switch ($visibility) {
    case '5':
      $icon = 'community';
      $title = t('Community');
      break;
    case '6':
      $icon = 'lock';
      $title = t('Closed');
      break;
  }
}

/**
 * @} End of "addtogroup hooks".
 */

Functions

Namesort descending Description
hook_social_post_visibility_info_alter Provide a method to alter the icon and title for post visibility.