', ']]>', $content);
// the first "more" is converted to a span with ID
$columns = preg_split('/(
<\/span>)|()<\/p>/', $content);
$col_count = count($columns);
if ( $col_count > 1 ) {
for($i=0; $i < $col_count; $i++) {
// check to see if there is a final , if not add it
if ( !preg_match('/<\/p>\s?$/', $columns[$i]) ) {
$columns[$i] .= '';
}
// check to see if there is an appending , if there is, remove
$columns[$i] = preg_replace('/^\s?<\/p>/', '', $columns[$i]);
// now add the div wrapper
if ((int)($i % 2) == 0) $coldiv = 'left'; else $coldiv = 'right';
if ($coldiv == 'right' && ($i+1) < $col_count) {
$break_cols ='
';
} else {
$break_cols = '';
}
$columns[$i] = ''.$columns[$i] .'
' . $break_cols ;
}
$content = join($columns, "\n");
} else {
// this page does not have dynamic columns
$content = wpautop($content);
}
// remove any left over empty tags
$content = str_replace('
', '', $content);
echo $content;
aweaver_fi( 'page', 'content-bottom' );
aweaver_link_pages(); //
?>