Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function register_bs_footer_init() {
- if ( function_exists('register_dd_layout_cell_type') ) {
- register_dd_layout_cell_type (
- 'bs-footer-cell',
- array ( 'name' => __('Theme Footer', 'wpbootstrap'),
- 'description' => __('BootStrap Theme Footer.', 'wpbootstrap'),
- 'category' => __('Theme cells', 'wpbootstrap'),
- 'category-icon-url' => get_template_directory_uri() . '/theme-options/bootstrap-grid/img/icon-16-insert-grid.png',
- 'button-text' => __('Assign Theme Footer Box', 'wpbootstrap'),
- 'dialog-title-create' => __('Create a new Footer Cell', 'wpbootstrap'),
- 'dialog-title-edit' => __('Edit Footer Cell', 'wpbootstrap'),
- 'dialog-template-callback' => 'bs_footer_dialog_template_callback',
- 'cell-content-callback' => 'bs_footer_cell_content_callback',
- 'cell-template-callback' => 'bs_footer_cell_template_callback'
- )
- );
- }
- }
- add_action( 'init', 'register_bs_footer_init' );
- function bs_footer_cell_content_callback($cell_settings) {
- ob_start();
- ?>
- </div><!-- #main .site-main -->
- <footer id="colophon" class="site-footer" role="contentinfo">
- <div class="container">
- <div class="row">
- <div class="col-md-6 col-lg-6">
- <?php if (has_nav_menu('footer-menu', 'bootstrapwp')) { ?>
- <nav role="navigation">
- <?php wp_nav_menu(array(
- 'container' => '',
- 'menu_class' => 'footer-menu',
- 'theme_location' => 'footer-menu')
- );
- ?>
- </nav>
- <?php } ?>
- </div>
- </div><!-- .row -->
- <div class="row">
- <div class="col-md-6 col-lg-6">
- <?php if (minimax_opt('left_footer_area') != '') { ?>
- <div class="copyright">
- <?php echo minimax_opt('left_footer_area'); ?>
- </div>
- <?php } ?>
- </div>
- <div class="col-md-6 col-lg-6">
- <div class="social-icons">
- <?php $social_options = minimax_opt( 'social_icons' ); ?>
- <?php foreach ( $social_options as $key => $value ) {
- if ( $value ) { ?>
- <a href="<?php echo $value; ?>" title="<?php echo $key; ?>" target="_blank">
- <i class="fa fa-<?php echo $key; ?>"></i>
- </a>
- <?php }
- } ?>
- </div><!-- .social-icons -->
- </div>
- <div class="col-md-6 col-lg-6">
- <?php if (minimax_opt('right_footer_area') != '') { ?>
- <div class="poweredby">
- <?php echo minimax_opt('right_footer_area'); ?>
- </div>
- <?php } ?>
- </div>
- </div><!-- .row -->
- </div><!-- .containr -->
- </footer><!-- #colophon -->
- </div><!-- #page -->
- <?php wp_footer(); ?>
- </body>
- </html>
- <?php
- $content = ob_get_clean();
- return $content;
- }
- function bs_footer_cell_template_callback() {
- return '';
- }
- function bs_footer_dialog_template_callback() {
- ob_start();
- ?>
- <p>
- <?php // allow the user to choose if the widgets should be shown. ?>
- <?php $checkbox_name = get_ddl_name_attr('show_widgets'); ?>
- <label for="<?php echo $checkbox_name; ?>"><?php _e('Show footer widgets', 'wpbootstrap'); ?></label>
- <input type="checkbox" name="<?php echo $checkbox_name; ?>">
- </p>
- <?php
- return ob_get_clean();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement