function readmorecontrol_supported_entity in Read More Control 7
Determines if the entity can support a Read more link.
5 calls to readmorecontrol_supported_entity()
- readmorecontrol_entity_view in ./readmorecontrol.module 
- Extract, update or construct the read more link.
- readmorecontrol_menu in ./readmorecontrol.module 
- Implements hook_menu().
- readmorecontrol_preprocess_search_result in ./readmorecontrol.module 
- Preprocessor for search result.
- _readmorecontrol_form_field_ui_display_overview_form_alter in ./readmorecontrol.admin.inc 
- Internal implementation of hook_form_FORM_ID_alter().
- _readmorecontrol_form_field_ui_field_edit_form_alter in ./readmorecontrol.admin.inc 
- Implements hook_form_FORM_ID_alter().
File
- ./readmorecontrol.module, line 185 
- Defines options to control how the Read more link is displayed on teasers.
Code
function readmorecontrol_supported_entity($entity_type, $info = NULL) {
  if (!$info) {
    $info = entity_get_info($entity_type);
  }
  if ((!empty($info['label callback']) || !empty($info['entity keys']['label'])) && !empty($info['uri callback'])) {
    if (!empty($info['view modes'])) {
      $excluded_modes = variable_get('readmorecontrol_disabled_view_modes', readmorecontrol_excluded_view_modes());
      $excluded_modes[] = 'default';
      $excluded_modes[] = 'full';
      $modes = array_keys($info['view modes']);
      $target_modes = array_diff($modes, $excluded_modes);
      return !empty($target_modes);
    }
  }
  return FALSE;
}