Skip to content

Instantly share code, notes, and snippets.

@themeblvd
Created July 30, 2014 20:24
Show Gist options
  • Save themeblvd/ce1f8755b8c2a20fc62b to your computer and use it in GitHub Desktop.
Save themeblvd/ce1f8755b8c2a20fc62b to your computer and use it in GitHub Desktop.
<?php
/**
* For themes built prior to framework 2.5, this puts
* the HTML markup back to the way it was originally
* for various framework hooks that were modified in 2.5,
* which changed the structural markup setup of the theme.
*/
/*------------------------------------------------------------*/
/* Header
/*------------------------------------------------------------*/
if ( !function_exists( 'themeblvd_header_above_default' ) ) :
/**
* Default display for action: themeblvd_header_above
*
* @since 2.0.0
*/
function themeblvd_header_above_default() {
echo '<div class="header-above">';
themeblvd_display_sidebar( 'ad_above_header' );
echo '</div><!-- .header-above (end) -->';
}
endif;
if ( !function_exists( 'themeblvd_header_content_default' ) ) :
/**
* Default display for action: themeblvd_header_content
*
* @since 2.0.0
*/
function themeblvd_header_content_default() {
?>
<div id="header_content">
<div class="header_content-inner">
<div class="header_content-content clearfix">
<?php
themeblvd_header_logo();
themeblvd_header_addon();
?>
</div><!-- .header_content-content (end) -->
</div><!-- .header_content-inner (end) -->
</div><!-- #header_content (end) -->
<?php
}
endif;
if ( !function_exists( 'themeblvd_header_menu_default' ) ) :
/**
* Default display for action: themeblvd_header_main_menu
*
* @since 2.0.0
*/
function themeblvd_header_menu_default() {
do_action( 'themeblvd_header_menu_before' );
?>
<a href="#access" class="btn-navbar">
<?php echo apply_filters( 'themeblvd_btn_navbar_text', '<i class="fa fa-bars"></i>' ); ?>
</a>
<nav id="access" role="navigation">
<div class="access-inner">
<div class="access-content clearfix">
<?php wp_nav_menu( apply_filters( 'themeblvd_primary_menu_args', array( 'menu_id' => 'primary-menu', 'menu_class' => 'sf-menu', 'container' => '', 'theme_location' => 'primary', 'fallback_cb' => 'themeblvd_primary_menu_fallback' ) ) ); ?>
<?php themeblvd_header_menu_addon(); ?>
</div><!-- .access-content (end) -->
</div><!-- .access-inner (end) -->
</nav><!-- #access (end) -->
<?php
do_action( 'themeblvd_header_menu_after' );
}
endif;
/*------------------------------------------------------------*/
/* Main content area
/*------------------------------------------------------------*/
if ( !function_exists( 'themeblvd_main_start_default' ) ) :
/**
* Default display for action: themeblvd_main_start
*
* @since 2.0.0
*/
function themeblvd_main_start_default() {
?>
<!-- MAIN (start) -->
<div id="main" class="<?php themeblvd_sidebar_layout_class(); ?>">
<div class="main-inner">
<div class="main-content">
<div class="grid-protection clearfix">
<?php
}
endif;
if ( !function_exists( 'themeblvd_main_end_default' ) ) :
/**
* Default display for action: themeblvd_main_end
*
* @since 2.0.0
*/
function themeblvd_main_end_default() {
?>
</div><!-- .grid-protection (end) -->
</div><!-- .main-content (end) -->
</div><!-- .main-inner (end) -->
</div><!-- #main (end) -->
<!-- MAIN (end) -->
<?php
}
endif;
if ( !function_exists( 'themeblvd_main_top_default' ) ) :
/**
* Default display for action: themeblvd_main_top
*
* @since 2.0.0
*/
function themeblvd_main_top_default() {
echo '<div class="main-top">';
themeblvd_display_sidebar( 'ad_above_content' );
echo '</div><!-- .main-top (end) -->';
}
endif;
if ( !function_exists( 'themeblvd_main_bottom_default' ) ) :
/**
* Default display for action: themeblvd_main_top
*
* @since 2.0.0
*/
function themeblvd_main_bottom_default() {
echo '<div class="main-bottom">';
themeblvd_display_sidebar( 'ad_below_content' );
echo '</div><!-- .main-bottom (end) -->';
}
endif;
/*------------------------------------------------------------*/
/* Footer
/*------------------------------------------------------------*/
if ( !function_exists( 'themeblvd_footer_content_default' ) ) :
/**
* Default display for action: themeblvd_footer_content
*
* @since 2.0.0
*/
function themeblvd_footer_content_default() {
// Grab the setup
$footer_setup = themeblvd_get_option( 'footer_setup' );
if ( $footer_setup ) {
$args = array();
$args['num'] = count( explode( '-', $footer_setup ) );
$args['widths'] = $footer_setup;
// Build array of columns
$i = 1;
$columns = array();
while ( $i <= $args['num'] ) {
$columns[$i] = themeblvd_get_option( 'footer_col_'.$i );
$i++;
}
?>
<div id="footer_content">
<div class="footer_content-inner">
<div class="footer_content-content">
<div class="grid-protection clearfix">
<?php themeblvd_columns( $args, $columns ); ?>
</div><!-- .grid-protection (end) -->
</div><!-- .footer_content-content (end) -->
</div><!-- .footer_content-inner (end) -->
</div><!-- .footer_content (end) -->
<?php
}
}
endif;
if ( !function_exists( 'themeblvd_footer_sub_content_default' ) ) :
/**
* Default display for action: themeblvd_footer_sub_content
*
* @since 2.0.0
*/
function themeblvd_footer_sub_content_default() {
?>
<div id="footer_sub_content">
<div class="footer_sub_content-inner">
<div class="footer_sub_content-content clearfix">
<div class="copyright">
<span class="copyright-inner">
<?php echo apply_filters( 'themeblvd_footer_copyright', themeblvd_get_option( 'footer_copyright' ) ); ?>
</span>
</div><!-- .copyright (end) -->
<div class="footer-nav">
<span class="footer-inner">
<?php wp_nav_menu( apply_filters( 'themeblvd_footer_menu_args', array( 'menu_id' => 'footer-menu', 'container' => '', 'fallback_cb' => '', 'theme_location' => 'footer', 'depth' => 1 ) ) ); ?>
</span>
</div><!-- .copyright (end) -->
</div><!-- .footer_sub_content-content (end) -->
</div><!-- .footer_sub_content-inner (end) -->
</div><!-- .footer_sub_content (end) -->
<?php
}
endif;
/**
* Default display for action: themeblvd_footer_below
*
* @since 2.0.0
*/
if ( !function_exists( 'themeblvd_footer_below_default' ) ) {
function themeblvd_footer_below_default() {
echo '<div class="footer-below">';
themeblvd_display_sidebar( 'ad_below_footer' );
echo '</div><!-- .footer-below (end) -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment