Guest User

footer.php

a guest
Nov 9th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.48 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'>
  74.  
  75.                         <?php
  76.  
  77.                         //create the footer columns by iterating
  78.  
  79.  
  80.                         switch($columns)
  81.                         {
  82.                             case 1: $class = ''; break;
  83.                             case 2: $class = 'av_one_half'; break;
  84.                             case 3: $class = 'av_one_third'; break;
  85.                             case 4: $class = 'av_one_fourth'; break;
  86.                             case 5: $class = 'av_one_fifth'; break;
  87.                             case 6: $class = 'av_one_sixth'; break;
  88.                         }
  89.  
  90.                         $firstCol = "first el_before_{$class}";
  91.  
  92.                         //display the footer widget that was defined at appearenace->widgets in the wordpress backend
  93.                         //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php
  94.                         for ($i = 1; $i <= $columns; $i++)
  95.                         {
  96.                             $class2 = ""; // initialized to avoid php notices
  97.                             if($i != 1) $class2 = " el_after_{$class}  el_before_{$class}";
  98.                             echo "<div class='flex_column {$class} {$class2} {$firstCol}'>";
  99.                             if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer2 - column'.$i) ) : else : avia_dummy_widget($i); endif;
  100.                             echo "</div>";
  101.                             $firstCol = "";
  102.                         }
  103.  
  104.                         ?>
  105.  
  106.  
  107.                     </div>
  108.  
  109.  
  110.                 <!-- ####### END FOOTER CONTAINER ####### -->
  111.                 </div>
  112.  
  113.     <?php   } //endif nofooterwidgets ?>
  114.  
  115.  
  116.  
  117.  
  118.  
  119.             <?php
  120.  
  121.             //copyright
  122.             $copyright = do_shortcode( avia_get_option('copyright', "&copy; ".__('Copyright','avia_framework')."  - <a href='".home_url('/')."'>".get_bloginfo('name')."</a>") );
  123.  
  124.             // you can filter and remove the backlink with an add_filter function
  125.             // from your themes (or child themes) functions.php file if you dont want to edit this file
  126.             // you can also just keep that link. I really do appreciate it ;)
  127.             $kriesi_at_backlink = kriesi_backlink(get_option(THEMENAMECLEAN."_initial_version"));
  128.  
  129.  
  130.             //you can also remove the kriesi.at backlink by adding [nolink] to your custom copyright field in the admin area
  131.             if($copyright && strpos($copyright, '[nolink]') !== false)
  132.             {
  133.                 $kriesi_at_backlink = "";
  134.                 $copyright = str_replace("[nolink]","",$copyright);
  135.             }
  136.  
  137.             if( $footer_widget_setting != 'nosocket' )
  138.             {
  139.  
  140.             ?>
  141.  
  142.                 <footer class='container_wrap socket_color' id='socket' <?php avia_markup_helper(array('context' => 'footer')); ?>>
  143.                     <div class='container'>
  144.  
  145.                         <span class='copyright'><?php echo $copyright . $kriesi_at_backlink; ?></span>
  146.  
  147.                         <?php
  148.                             if(avia_get_option('footer_social', 'disabled') != "disabled")
  149.                             {
  150.                                 $social_args    = array('outside'=>'ul', 'inside'=>'li', 'append' => '');
  151.                                 echo avia_social_media_icons($social_args, false);
  152.                             }
  153.  
  154.  
  155.                                 $avia_theme_location = 'avia3';
  156.                                 $avia_menu_class = $avia_theme_location . '-menu';
  157.  
  158.                                 $args = array(
  159.                                     'theme_location'=>$avia_theme_location,
  160.                                     'menu_id' =>$avia_menu_class,
  161.                                     'container_class' =>$avia_menu_class,
  162.                                     'fallback_cb' => '',
  163.                                     'depth'=>1,
  164.                                     'echo' => false,
  165.                                     'walker' => new avia_responsive_mega_menu(array('megamenu'=>'disabled'))
  166.                                 );
  167.  
  168.                             $menu = wp_nav_menu($args);
  169.  
  170.                             if($menu){
  171.                             echo "<nav class='sub_menu_socket' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">";
  172.                             echo $menu;
  173.                             echo "</nav>";
  174.                             }
  175.                         ?>
  176.  
  177.                     </div>
  178.  
  179.                 <!-- ####### END SOCKET CONTAINER ####### -->
  180.                 </footer>
  181.  
  182.  
  183.             <?php
  184.             } //end nosocket check
  185.  
  186.  
  187.  
  188.  
  189.         } //end blank & nofooterarea check
  190.         ?>
  191.         <!-- end main -->
  192.         </div>
  193.  
  194.         <?php
  195.         //display link to previeous and next portfolio entry
  196.         echo avia_post_nav();
  197.  
  198.         echo "<!-- end wrap_all --></div>";
  199.  
  200.  
  201.         if(isset($avia_config['fullscreen_image']))
  202.         { ?>
  203.             <!--[if lte IE 8]>
  204.             <style type="text/css">
  205.             .bg_container {
  206.             -ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale')";
  207.             filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale');
  208.             }
  209.             </style>
  210.             <![endif]-->
  211.         <?php
  212.             echo "<div class='bg_container' style='background-image:url(".$avia_config['fullscreen_image'].");'></div>";
  213.         }
  214.     ?>
  215.  
  216.  
  217. <?php
  218.  
  219.  
  220.  
  221.  
  222.     /* Always have wp_footer() just before the closing </body>
  223.      * tag of your theme, or you will break many plugins, which
  224.      * generally use this hook to reference JavaScript files.
  225.      */
  226.  
  227.  
  228.     wp_footer();
  229.  
  230.  
  231. ?>
  232. <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>
  233.  
  234. <div id="fb-root"></div>
  235. </body>
  236. </html>
Advertisement
Add Comment
Please, Sign In to add comment