function wt_brands_shortcode( $atts, $content ){ global $db; echo ''; $max_items = isset($atts['max_brands']) ? (int)$atts['max_brands'] : 8; $brands = $db->Execute("SELECT * FROM " . TABLE_MANUFACTURERS . " ORDER BY manufacturers_name", $max_items); echo ''; $output = ''; if ($brands->RecordCount() > 0) { foreach ($brands as $brand) { $image_path = DIR_WS_IMAGES . $brand['manufacturers_image']; $output .= ''; $output .= '' . htmlspecialchars($brand['manufacturers_name']) . ''; $output .= ''; } } else { $output = ''; } return $output; }