tag is intentional - you MUST pair up
// this function with a call to the 'scaffolding_right' version.
return '
';
}
/**
* Generates the ending markup that surrounds article content.
*
* Note: This function only makes sense to use if you precede it
* with a call to tag_article_scaffolding_left.
*
* @param array $args Can be any of the following arguments:
* TBD
* @return string The generated markup
*/
function tag_article_scaffolding_right( $args = array() )
{
// Merge default arguments and the arguments supplied by the caller.
$defaults = array(
// TBD
);
$args = (object)wp_parse_args( $args, $defaults );
// Note: Not opening the
tag is intentional - you MUST pair up
// this function with a call to the 'scaffolding_left' version.
return '
';
}
/**
* Generates the markup for any potential sidebars to the right of the main content.
*
* @param array $args Can be any of the following arguments:
* string $sidebar_align_class Can be 'ml', 'mc', or 'mr' for left, center, or right text alignment
* string $sidebar_layout Can be '0', 'l1', 'l2', '11r1', 'r2', or 'r1'
* integer $sidebar_size The number of columns that each sidebar takes up in a 12-column grid
* boolean $hide_mobile Set to 'true' if you do not want the sidebar to appear on small screens
* @return string The generated markup
*/
function tag_sidebars_right( $args = array() )
{
// Merge default arguments and the arguments supplied by the caller.
$defaults = array(
'sidebar_align_class' => 'ml',
'sidebar_layout' => '0',
'sidebar_size' => 3,
'hide_mobile' => false,
);
$args = (object)wp_parse_args( $args, $defaults );
// These get used in the markup based on the option analysis.
$class_col_sidebar = ' area-sidebar right-sidebar';
$content = '';
// The caller must supply the alignment.
$class_col_sidebar .= ' '.$args->sidebar_align_class;
// A sidebar might not look right on mobile, so respect that.
if ( $args->hide_mobile ) $class_col_sidebar .= ' desktop';
// Determine the number of sidebars and some class info for
// grid among the potential sidebars and content area.
$num_sidebars = convert_symbol_sidebar_layout( $args->sidebar_layout );
$class_col_sidebar .= ' col-md-'.( ( $num_sidebars > 0 ) ? $args->sidebar_size : 0 );
// Draw up the divs that contain the potential sidebars.
ob_start();
if ( in_array( $args->sidebar_layout, array( 'r1', 'r2' ) ) )
{
echo '';
}
if ( in_array( $args->sidebar_layout, array( 'l1r1', 'r2' ) ) )
{
echo '';
}
$content .= ob_get_clean();
// The markup.
return $content;
}
/**
* Generates a footer/widget area.
*
* @param array $args Can be any of the following arguments:
* string $span_class Can be Bootstrap's 'container' or 'container-fluid'
* string $align_class Can be 'ml', 'mc', or 'mr' for left, center, or right text alignment
* integer $num_pedestals Can be 1, 2, 3, 4, or 6 widgetized areas going across
* @return string The generated markup
*/
function tag_pedestal( $args = array() )
{
// Merge default arguments and the arguments supplied by the caller.
$defaults = array(
'span_class' => 'container-fluid',
'align_class' => 'mc',
'num_pedestals' => 0
);
$args = (object)wp_parse_args( $args, $defaults );
// These get used in the markup based on the option analysis.
$class = '';
$class_col = '';
$content = '';
// The caller must supply the Bootstrap boxing container.
$class .= ' '.$args->span_class;
// Split the widgets evenly and give each its own alignment.
$class_col .= ' '.$args->align_class;
$class_col .= ' '.\ski\bootstrap::convert_to_equal_grid_columns( $args->num_pedestals, 'md' );
// There is no 'get' variety of dynamic_sidebar, so we must use
// the ob_ wrapper to redirect output and capture in $content.
ob_start();
echo '
';
for ( $i = 1; $i <= $args->num_pedestals; $i++ )
{
$id = sprintf( 'pedestal-%d', $i );
echo '
';
if ( !dynamic_sidebar( $id ) )
{
echo
'
';
}
echo '
';
}
echo '
';
$content .= ob_get_clean();
// The markup.
return
'
';
}
/**
* Generates bottom bar that typically sits below the pedestal,
* in the footer area.
*
* @param array $args Can be any of the following arguments:
* string $span_class Can be Bootstrap's 'container' or 'container-fluid'
* string $align_class Can be 'ml', 'mc', or 'mr' for left, center, or right text alignment
* @return string The generated markup
*/
function tag_bottom( $args = array() )
{
// Merge default arguments and the arguments supplied by the caller.
$defaults = array(
'span_class' => 'container-fluid',
'align_class' => 'mc'
);
$args = (object)wp_parse_args( $args, $defaults );
// These get used in the markup based on the option analysis.
$class = '';
$content = '';
// The caller must supply the Bootstrap boxing container and alignment.
$class .= ' '.$args->span_class;
$class .= ' '.$args->align_class;
// If in the architect version, then there is simply a
// single widgetized area here.
if ( BPQ_EDITION >= 2 )
{
ob_start();
if ( !dynamic_sidebar( 'bottom-1' ) )
{
echo
'
';
}
$content .= ob_get_clean();
}
// Otherwise, if any other version, then force a
// credit for BluePrint-Q.
else
{
// Note: Fake a widget class here for consistent spacing.
$content .= sprintf(
__(
'
',
'bpq'
),
welcome::url()
);
}
// The markup; repeat content twice - once for a regular desktop
// layout and another time for a mobile collapsed layout.
return
'
';
}
?>