You are here

function mostpopular_drupal_mostpopular_service_info in Drupal Most Popular 7

Implements hook_mostpopular_service_info().

See also

hook_mostpopular_service_info()

File

modules/mostpopular_drupal/mostpopular_drupal.module, line 23
This module uses the Drupal statistics module to provide Most Popular data.

Code

function mostpopular_drupal_mostpopular_service_info() {
  $info = array();
  if (module_exists('statistics')) {
    $info['viewed'] = array(
      'name' => t('Drupal Most Viewed Nodes'),
      'title' => t('Viewed'),
      'entity_types' => array(
        'node',
      ),
    );
  }
  if (module_exists('comment')) {
    $info['commented'] = array(
      'name' => t('Drupal Most Commented Nodes'),
      'title' => t('Commented'),
      'entity_types' => TRUE,
    );
  }
  return $info;
}