You are here

function social_post_views_data_alter in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  2. 8 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  3. 8.2 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  4. 8.3 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  5. 8.4 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  6. 8.5 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  7. 8.6 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  8. 8.7 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  9. 8.8 modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  10. 10.3.x modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  11. 10.0.x modules/social_features/social_post/social_post.module \social_post_views_data_alter()
  12. 10.1.x modules/social_features/social_post/social_post.module \social_post_views_data_alter()

Implements hook_views_data_alter().

File

modules/social_features/social_post/social_post.module, line 162
The Social post module.

Code

function social_post_views_data_alter(array &$data) {
  $data['post']['post_visibility_access_filter'] = [
    'title' => t('Post visibility access'),
    'filter' => [
      'title' => t('Post visibility access'),
      'help' => t('Enable post access for public and community posts.'),
      'field' => 'field_visibility',
      'id' => 'post_visibility_access',
    ],
  ];
  $data['post']['post_account_stream_filter'] = [
    'title' => t('Post account stream'),
    'filter' => [
      'title' => t('Post account stream'),
      'help' => t('Enable post for the account stream.'),
      'field' => 'field_visibility',
      'id' => 'post_account_stream',
    ],
  ];
  $data['post']['post_group_stream_filter'] = [
    'title' => t('Post group stream'),
    'filter' => [
      'title' => t('Post group stream'),
      'help' => t('Enable post for the group stream.'),
      'field' => 'field_visibility',
      'id' => 'post_group_stream',
    ],
  ];
}