You are here

function _amazon_clean_type in Amazon Product Advertisement API 7.2

Same name and namespace in other branches
  1. 6 amazon.module \_amazon_clean_type()
  2. 7 amazon.module \_amazon_clean_type()

Convert a type like ABIS_whatever into just whatever.

Parameters

unknown_type $type:

2 calls to _amazon_clean_type()
template_preprocess_amazon_item in ./amazon.module
template_preprocess: amazon_item.
_amazon_item_classes in ./amazon.module
Create name of the extra css class for an item.

File

./amazon.module, line 326

Code

function _amazon_clean_type($type) {
  return check_plain(strtolower(str_replace(array(
    'ABIS_',
    'CONSOLE_',
    'VIDEO_',
    ' ',
  ), array(
    '',
    '',
    '',
    '_',
  ), $type)));
}