You are here

clean_markup_views.module in Clean Markup 7.3

Provides clean Views markup.

File

modules/clean_markup_views/clean_markup_views.module
View source
<?php

/**
 * @file
 * Provides clean Views markup.
 */

/**
 * Implements hook_views_api().
 */
function clean_markup_views_views_api() {
  $path = drupal_get_path('module', 'clean_markup_views');
  return array(
    'api' => 3,
    'path' => $path,
    'template path' => $path . '/templates',
  );
}

/**
 * Implements hook_permission().
 */
function clean_markup_views_permission() {
  $permissions = array();
  $permissions['administer clean markup views settings'] = array(
    'title' => t('Administer clean views markup settings'),
    'description' => t('Change the HTML used to render views.'),
  );
  return $permissions;
}

/**
 * Implements hook_form_FORM_ID_alter().
 */
function clean_markup_views_form_views_ui_edit_form_alter(&$form, &$form_state, $form_id) {
  if (user_access('administer clean markup views settings')) {
    $form['displays']['settings']['settings_content']['tab_content']['details']['columns']['second']['markup'] = array(
      '#name' => 'Markup',
      '#title' => 'Markup',
      '#weight' => '-4',
    );
  }
}