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( "/(?:\[ABP:(?:\s*)(?:(S|M|L)(?:(?:\s*):)){0,1}(?:\s*)([^:\]]+)(?:\s*)(?::W(?:\s*):(?:\s*)(\d+)(?:\s*)){0,1}(?::H(?:\s*):(?:\s*)(\d+)){0,1}(?::I(?:\s*):(?:\s*)([^:]+)){0,1}(?::C(?:\s*):(?:\s*)([^:]+)){0,1}\])/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); ?>