. SIZE: S for small, M for medium or L for large. if not given, defaults to medium. ASIN: plain asin number without - symbols. SIZE, IMG-WIDTH, IMG-HEIGHT, IMG-ID and IMG-CLASS are optional. Examples: Originally found at http://narcanti.keyboardsamurais.de Author: M. Serhat Cinar / adapted by Th. Weisse Author URI: http://www.drwatson32.de License: GPL */ if( !function_exists( 'abp_tag_handler' ) ){ function abp_tag_handler($asin, $size="M", $width="", $height="", $id="", $class=""){ $base_url = '0){ $base_url = $base_url.' width="'.$width.'"'; } if (strlen($height)>0){ $base_url = $base_url.' height="'.$height.'"'; } if (strlen($id)>0){ $base_url = $base_url.' id="'.$id.'"'; } if (strlen($class)>0){ $base_url = $base_url.' class="'.$class.'"'; } $base_url = $base_url.' />'; return $base_url; } } if( !function_exists( 'abp_tag' ) ){ function abp_tag($text){ return preg_replace( "/(?:)/ismeU", "abp_tag_handler('\\2', '\\1', '\\3', '\\4', '\\5', '\\6')", $text ); } } add_filter('the_content', 'abp_tag', 10); add_filter('the_excerpt', 'abp_tag', 10); ?>