Skip to content

Instantly share code, notes, and snippets.

@fovoc
Created March 18, 2015 16:11
Show Gist options
  • Save fovoc/693dc6f5bab8fdaeca8f to your computer and use it in GitHub Desktop.
Save fovoc/693dc6f5bab8fdaeca8f to your computer and use it in GitHub Desktop.
Shoestrap 3 - use a container in pre_footer
<?php
function remove_pre_footer_markup() {
$action = 'shoestrap_pre_footer';
remove_action( $action, 'shoestrap_ewa_'.$action, 99 );
}
add_action( 'wp', 'remove_pre_footer_markup' );
function add_pre_footer_markup() {
global $ss_framework;
$action = 'shoestrap_pre_footer';
$num = intval( shoestrap_getVariable( $action . '_nr' ) );
if ( shoestrap_getVariable( $action . '_check' ) == '1' ) {
echo $ss_framework->open_row( 'div', null, $action, null );
echo '<div class="container">';
for ( $i = 1; $i < ( $num + 1 ); $i++ ) {
echo '<div class="'. $ss_framework->column_classes( array( 'medium' => 12 / $num ), null ) .'">';
dynamic_sidebar( $action . '_' . $i );
echo '</div>';
}
echo '</div>';
echo $ss_framework->close_row( 'div' );
} elseif ( shoestrap_getVariable( $action . '_check' ) == '2' ) {
echo apply_filters( 'the_content', shoestrap_getVariable( $action . '_custom_content' ) );
}
}
add_action( 'shoestrap_pre_footer', 'add_pre_footer_markup' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment