Advertisement
Guest User

second footer

a guest
Dec 6th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.57 KB | None | 0 0
  1.         <?php
  2.  
  3.         do_action( 'ava_before_footer' );
  4.  
  5.         global $avia_config;
  6.         $blank = isset($avia_config['template']) ? $avia_config['template'] : "";
  7.  
  8.         //reset wordpress query in case we modified it
  9.         wp_reset_query();
  10.  
  11.  
  12.         //get footer display settings
  13.         $the_id                 = avia_get_the_id(); //use avia get the id instead of default get id. prevents notice on 404 pages
  14.         $footer                 = get_post_meta($the_id, 'footer', true);
  15.         $footer_widget_setting  = !empty($footer) ? $footer : avia_get_option('display_widgets_socket');
  16.  
  17.  
  18.         //check if we should display a footer
  19.         if(!$blank && $footer_widget_setting != 'nofooterarea' )
  20.         {
  21.             if( $footer_widget_setting != 'nofooterwidgets' )
  22.             {
  23.                 //get columns
  24.                 $columns = avia_get_option('footer_columns');
  25.         ?>
  26.                 <div class='container_wrap footer_color' id='footer'>
  27.  
  28.                     <div class='container'>
  29.  
  30.                         <?php
  31.                         do_action('avia_before_footer_columns');
  32.  
  33.                         //create the footer columns by iterating
  34.  
  35.  
  36.                         switch($columns)
  37.                         {
  38.                             case 1: $class = ''; break;
  39.                             case 2: $class = 'av_one_half'; break;
  40.                             case 3: $class = 'av_one_third'; break;
  41.                             case 4: $class = 'av_one_fourth'; break;
  42.                             case 5: $class = 'av_one_fifth'; break;
  43.                             case 6: $class = 'av_one_sixth'; break;
  44.                         }
  45.  
  46.                         $firstCol = "first el_before_{$class}";
  47.  
  48.                         //display the footer widget that was defined at appearenace->widgets in the wordpress backend
  49.                         //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php
  50.                         for ($i = 1; $i <= $columns; $i++)
  51.                         {
  52.                             $class2 = ""; // initialized to avoid php notices
  53.                             if($i != 1) $class2 = " el_after_{$class}  el_before_{$class}";
  54.                             echo "<div class='flex_column {$class} {$class2} {$firstCol}'>";
  55.                             if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer - column'.$i) ) : else : avia_dummy_widget($i); endif;
  56.                             echo "</div>";
  57.                             $firstCol = "";
  58.                         }
  59.  
  60.                         do_action('avia_after_footer_columns');
  61.  
  62.                         ?>
  63.  
  64.  
  65.                     </div>
  66.  
  67.  
  68.                 <!-- ####### END FOOTER CONTAINER ####### -->
  69.                 </div>
  70.  
  71.                 <div class='container_wrap footer_color' id='footer'>
  72.  
  73.                 <div class='container_wrap footer_color second_footer' id='footer'>
  74.  
  75.                     <div class='container'>
  76.  
  77.                         <?php
  78.  
  79.                         //create the footer columns by iterating
  80.  
  81.  
  82.                         switch($columns)
  83.                         {
  84.                             case 1: $class = ''; break;
  85.                             case 2: $class = 'av_one_half'; break;
  86.                             case 3: $class = 'av_one_third'; break;
  87.                             case 4: $class = 'av_one_fourth'; break;
  88.                             case 5: $class = 'av_one_fifth'; break;
  89.                             case 6: $class = 'av_one_sixth'; break;
  90.                         }
  91.  
  92.                         $firstCol = "first el_before_{$class}";
  93.  
  94.                         //display the footer widget that was defined at appearenace->widgets in the wordpress backend
  95.                         //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php
  96.                         for ($i = 1; $i <= $columns; $i++)
  97.                         {
  98.                             $class2 = ""; // initialized to avoid php notices
  99.                             if($i != 1) $class2 = " el_after_{$class}  el_before_{$class}";
  100.                             echo "<div class='flex_column {$class} {$class2} {$firstCol}'>";
  101.                             if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer2 - column'.$i) ) : else : avia_dummy_widget($i); endif;
  102.                             echo "</div>";
  103.                             $firstCol = "";
  104.                         }
  105.  
  106.                         ?>
  107.  
  108.  
  109.                     </div>
  110.                    
  111.                    
  112.                    
  113.                    
  114.  
  115.                 <!-- ####### END FOOTER CONTAINER ####### -->
  116.                 </div>
  117.  
  118.     <?php   } //endif nofooterwidgets ?>
  119.  
  120.  
  121.  
  122.  
  123.  
  124.             <?php
  125.  
  126.             //copyright
  127.             $copyright = do_shortcode( avia_get_option('copyright', "&copy; ".__('Copyright','avia_framework')."  - <a href='".home_url('/')."'>".get_bloginfo('name')."</a>") );
  128.  
  129.             // you can filter and remove the backlink with an add_filter function
  130.             // from your themes (or child themes) functions.php file if you dont want to edit this file
  131.             // you can also just keep that link. I really do appreciate it ;)
  132.             $kriesi_at_backlink = kriesi_backlink(get_option(THEMENAMECLEAN."_initial_version"));
  133.  
  134.  
  135.             //you can also remove the kriesi.at backlink by adding [nolink] to your custom copyright field in the admin area
  136.             if($copyright && strpos($copyright, '[nolink]') !== false)
  137.             {
  138.                 $kriesi_at_backlink = "";
  139.                 $copyright = str_replace("[nolink]","",$copyright);
  140.             }
  141.  
  142.             if( $footer_widget_setting != 'nosocket' )
  143.             {
  144.  
  145.             ?>
  146.  
  147.                 <footer class='container_wrap socket_color' id='socket' <?php avia_markup_helper(array('context' => 'footer')); ?>>
  148.                     <div class='container'>
  149.  
  150.                         <span class='copyright'><?php echo $copyright . $kriesi_at_backlink; ?></span>
  151.  
  152.                         <?php
  153.                             if(avia_get_option('footer_social', 'disabled') != "disabled")
  154.                             {
  155.                                 $social_args    = array('outside'=>'ul', 'inside'=>'li', 'append' => '');
  156.                                 echo avia_social_media_icons($social_args, false);
  157.                             }
  158.  
  159.  
  160.                                 $avia_theme_location = 'avia3';
  161.                                 $avia_menu_class = $avia_theme_location . '-menu';
  162.  
  163.                                 $args = array(
  164.                                     'theme_location'=>$avia_theme_location,
  165.                                     'menu_id' =>$avia_menu_class,
  166.                                     'container_class' =>$avia_menu_class,
  167.                                     'fallback_cb' => '',
  168.                                     'depth'=>1,
  169.                                     'echo' => false,
  170.                                     'walker' => new avia_responsive_mega_menu(array('megamenu'=>'disabled'))
  171.                                 );
  172.  
  173.                             $menu = wp_nav_menu($args);
  174.  
  175.                             if($menu){
  176.                             echo "<nav class='sub_menu_socket' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">";
  177.                             echo $menu;
  178.                             echo "</nav>";
  179.                             }
  180.                         ?>
  181.  
  182.                     </div>
  183.  
  184.                 <!-- ####### END SOCKET CONTAINER ####### -->
  185.                 </footer>
  186.  
  187.  
  188.             <?php
  189.             } //end nosocket check
  190.  
  191.  
  192.  
  193.  
  194.         } //end blank & nofooterarea check
  195.         ?>
  196.         <!-- end main -->
  197.         </div>
  198.  
  199.         <?php
  200.         //display link to previeous and next portfolio entry
  201.         echo avia_post_nav();
  202.  
  203.         echo "<!-- end wrap_all --></div>";
  204.  
  205.  
  206.         if(isset($avia_config['fullscreen_image']))
  207.         { ?>
  208.             <!--[if lte IE 8]>
  209.             <style type="text/css">
  210.             .bg_container {
  211.             -ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale')";
  212.             filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale');
  213.             }
  214.             </style>
  215.             <![endif]-->
  216.         <?php
  217.             echo "<div class='bg_container' style='background-image:url(".$avia_config['fullscreen_image'].");'></div>";
  218.         }
  219.     ?>
  220.  
  221.  
  222. <?php
  223.  
  224.  
  225.  
  226.  
  227.     /* Always have wp_footer() just before the closing </body>
  228.      * tag of your theme, or you will break many plugins, which
  229.      * generally use this hook to reference JavaScript files.
  230.      */
  231.  
  232.  
  233.     wp_footer();
  234.  
  235.  
  236. ?>
  237. <a href='#top' title='<?php _e('Scroll to top','avia_framework'); ?>' id='scroll-top-link' <?php echo av_icon_string( 'scrolltop' ); ?>><span class="avia_hidden_link_text"><?php _e('Scroll to top','avia_framework'); ?></span></a>
  238.  
  239. <div id="fb-root"></div>
  240. </body>
  241. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement