You are here

adsense_adstxt.module in Google AdSense integration 7

Same filename and directory in other branches
  1. 8 adstxt/adsense_adstxt.module

Displays Google AdSense ads on Drupal pages.

This is the core module of the AdSense package, with the Drupal hooks and other administrative functions.

File

adstxt/adsense_adstxt.module
View source
<?php

/**
 * @file
 * Displays Google AdSense ads on Drupal pages.
 *
 * This is the core module of the AdSense package, with the Drupal hooks
 * and other administrative functions.
 */

/**
 * Implements hook_menu().
 */
function adsense_adstxt_menu() {
  $items = array();
  $items['ads.txt'] = array(
    'title' => 'ads.txt',
    'page callback' => 'adsense_adstxt_controller',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'adsense_adstxt.pages.inc',
  );
  return $items;
}

/**
 * Implements hook_help().
 */
function adsense_adstxt_help($path, $arg) {
  switch ($path) {
    case 'admin/help#adsense_adstxt':
      return '<p>' . t('This module creates an ads.txt file compliant with the <a href="@link">ads.txt specification</a>.', array(
        '@link' => 'https://iabtechlab.com/ads-txt',
      )) . '</p>';
  }
  return '';
}

Functions

Namesort descending Description
adsense_adstxt_help Implements hook_help().
adsense_adstxt_menu Implements hook_menu().