A bug, thanks. To correct it in 3.4.2, replace the whole bfa_widget_area function from line 308-362 in functions.php with this:
This adds the width parameter which was missing, adds the missing <tr> ... </tr>, and displays a <DIV> instead of a table, if there's only 1 widget cell.
PHP Code:
function bfa_widget_area($args = '') {
$defaults = array(
'cells' => 1,
'align' => 2,
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-title"><h3>',
'after_title' => '</h3></div>',
);
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
$area_id = strtolower(str_ireplace(" ", "_", $r['name']));
// If there are more than 1 cell, use a table, otherwise just a DIV:
if ( $r['cells'] > 1 ) {
echo '<table id="' . $area_id . '" class="bfa_widget_area" style="table-layout:fixed;width:100%" cellpadding="0" cellspacing="0" border="0">';
// If a width was set for any of the widget area cells:
if ( strpos($args,'width_') !== FALSE ) {
echo "\n<colgroup>";
for ( $i = 1; $i <= $r['cells']; $i++ ) {
echo '<col';
$current_width = "width_" . $i;
if ( $r[$current_width] ) {
echo ' style="width:' . $r[$current_width] . 'px"';
}
echo ' />';
}
echo "</colgroup>";
}
echo "<tr>";
for ( $i = 1; $i <= $r['cells']; $i++ ) {
$current_name = $r['name'] . ' ' . $i;
$current_id = $area_id . '_' . $i;
$current_align = "align_" . $i;
echo "\n" . '<td id="' . $current_id .'" ';
if ( $r[$current_align] ) {
$align_type = $r["$current_align"];
} else {
$align_type = $r['align'];
}
echo bfa_table_cell_align($align_type) . ">";
// Register widget area
#$bfa_ata_widget_areas[] = $current_name;
$bfa_ata_widget_areas[] = array(
"name" => $current_name,
"before_widget" => $r['before_widget'],
"after_widget" => $r['after_widget'],
"before_title" => $r['before_title'],
"after_title" => $r['after_title']
);
// Display widget area
dynamic_sidebar("$current_name");
echo "\n</td>";
}
echo "\n</tr></table>";
} else {
// If only 1 widget cell, use a DIV instead of a table
echo '<div id="' . $area_id . '" class="bfa_widget_area">';
// Add new widget area to existing ones
$bfa_ata_widget_areas[] = array(
"name" => $r['name'],
"before_widget" => $r['before_widget'],
"after_widget" => $r['after_widget'],
"before_title" => $r['before_title'],
"after_title" => $r['after_title']
);
// Display widget area
dynamic_sidebar($r['name']);
echo '</div>';
}
update_option("bfa_widget_areas", $bfa_ata_widget_areas);
}
Additionally add this at HTML/CSS Inserts:
HTML Code:
table.bfa_widget_area td {
text-align: left;
}
Otherwise the text inside widgets will be centered, if the widget cell is centered
All of the above will be included in 3.4.3