Browse files

Add headers to table in shortcode output

Output headers for pricing table
  • Loading branch information...
1 parent dde1966 commit 620b2dfe82c04c903a3990cc06bbab6f7c4bc642 @1bigidea committed Mar 31, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 inc/class.shortcodes.php
View
1 inc/class.shortcodes.php
@@ -53,6 +53,7 @@ function pricetable($atts){
$rows = explode(',', $qty);
$output = '<table class="price-table">';
+ $output .= sprintf('<thead><th>%s</th><th>%s</th></thead>', __('Qty', 'nono-per-unit'), __('Price', 'nono-per-unit'));
foreach( $rows as $row ){
$row_text = '<tr><td class="price-table-qty">%d</td><td class="price-table-amount">%s</td></tr>';
$output .= sprintf($row_text, (int) $row, number_format(self::determine_price($row, $prices), 2, ',', '') );

0 comments on commit 620b2df

Please sign in to comment.