You are here

function _adsense_id_settings_client_id_mods in Google AdSense integration 7

Same name and namespace in other branches
  1. 5.3 adsense.admin.inc \_adsense_id_settings_client_id_mods()
  2. 6 adsense.admin.inc \_adsense_id_settings_client_id_mods()

Search for the available Publisher ID modules.

Return value

array array of selectable Publisher ID functions

1 call to _adsense_id_settings_client_id_mods()
adsense_id_settings in ./adsense.admin.inc
Menu callback for the adsense publisher ID settings form.

File

./adsense.admin.inc, line 203
Contains the administrative functions of the adsense module.

Code

function _adsense_id_settings_client_id_mods() {
  $ret['adsense_basic'] = 'Always use the site Publisher ID.';
  $funcs = get_defined_functions();
  foreach ($funcs['user'] as $func) {
    if (preg_match('!_adsense$!', $func)) {
      $settings = $func('settings');
      $ret[$func] = $settings['name'];
      if (!empty($settings['desc'])) {
        $ret[$func] .= "<div style='margin-left: 2.5em;' class='description'>{$settings['desc']}</div>";
      }
    }
  }
  return $ret;
}