Guest User

footer.php

a guest
Sep 11th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.38 KB | None | 0 0
  1.         <?php
  2.         global $avia_config;
  3.         $blank = isset($avia_config['template']) ? $avia_config['template'] : "";
  4.  
  5.         //reset wordpress query in case we modified it
  6.         wp_reset_query();
  7.  
  8.  
  9.         //get footer display settings
  10.         $the_id                 = avia_get_the_id(); //use avia get the id instead of default get id. prevents notice on 404 pages
  11.         $footer                 = get_post_meta($the_id, 'footer', true);
  12.         $footer_widget_setting  = !empty($footer) ? $footer : avia_get_option('display_widgets_socket');
  13.  
  14.  
  15.         //check if we should display a footer
  16.         if(!$blank && $footer_widget_setting != 'nofooterarea' )
  17.         {
  18.             if( $footer_widget_setting != 'nofooterwidgets' )
  19.             {
  20.                 //get columns
  21.                 $columns = avia_get_option('footer_columns');
  22.         ?>
  23.                 <div class='container_wrap footer_color' id='footer'>
  24.  
  25.                     <div class='container'>
  26.  
  27.                         <?php
  28.                         do_action('avia_before_footer_columns');
  29.  
  30.                         //create the footer columns by iterating
  31.  
  32.                        
  33.                         switch($columns)
  34.                         {
  35.                             case 1: $class = ''; break;
  36.                             case 2: $class = 'av_one_half'; break;
  37.                             case 3: $class = 'av_one_third'; break;
  38.                             case 4: $class = 'av_one_fourth'; break;
  39.                             case 5: $class = 'av_one_fifth'; break;
  40.                             case 6: $class = 'av_one_sixth'; break;
  41.                         }
  42.                        
  43.                         $firstCol = "first el_before_{$class}";
  44.  
  45.                         //display the footer widget that was defined at appearenace->widgets in the wordpress backend
  46.                         //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php
  47.                         for ($i = 1; $i <= $columns; $i++)
  48.                         {
  49.                             $class2 = ""; // initialized to avoid php notices
  50.                             if($i != 1) $class2 = " el_after_{$class}  el_before_{$class}";
  51.                             echo "<div class='flex_column {$class} {$class2} {$firstCol}'>";
  52.                             if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer - column'.$i) ) : else : avia_dummy_widget($i); endif;
  53.                             echo "</div>";
  54.                             $firstCol = "";
  55.                         }
  56.  
  57.                         do_action('avia_after_footer_columns');
  58.  
  59.                         ?>
  60.  
  61.  
  62.                     </div>
  63.  
  64.  
  65.                 <!-- ####### END FOOTER CONTAINER ####### -->
  66.                 </div>
  67.                
  68.                 <div class='container_wrap footer_color' id='footer'>
  69.  
  70.                     <div class='container'>
  71.  
  72.                         <?php
  73.                         do_action('avia_before_footer_columns');
  74.  
  75.                         //create the footer columns by iterating
  76.  
  77.                        
  78.                         switch($columns)
  79.                         {
  80.                             case 1: $class = ''; break;
  81.                             case 2: $class = 'av_one_half'; break;
  82.                             case 3: $class = 'av_one_third'; break;
  83.                             case 4: $class = 'av_one_fourth'; break;
  84.                             case 5: $class = 'av_one_fifth'; break;
  85.                             case 6: $class = 'av_one_sixth'; break;
  86.                         }
  87.                        
  88.                         $firstCol = "first el_before_{$class}";
  89.  
  90.                         //display the footer widget that was defined at appearenace->widgets in the wordpress backend
  91.                         //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php
  92.                         for ($i = 1; $i <= $columns; $i++)
  93.                         {
  94.                             $class2 = ""; // initialized to avoid php notices
  95.                             if($i != 1) $class2 = " el_after_{$class}  el_before_{$class}";
  96.                             echo "<div class='flex_column {$class} {$class2} {$firstCol}'>";
  97.                             if (function_exists('dynamic_sidebar') && dynamic_sidebar('Footer2 - column'.$i) ) : else : avia_dummy_widget($i); endif;
  98.                             echo "</div>";
  99.                             $firstCol = "";
  100.                         }
  101.  
  102.                         do_action('avia_after_footer_columns');
  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.                             echo "<nav class='sub_menu_socket' ".avia_markup_helper(array('context' => 'nav', 'echo' => false)).">";
  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.                                 );
  165.  
  166.                                 wp_nav_menu($args);
  167.                             echo "</nav>";
  168.        
  169.                         ?>
  170.  
  171.                     </div>
  172.  
  173.                 <!-- ####### END SOCKET CONTAINER ####### -->
  174.                 </footer>
  175.  
  176.  
  177.             <?php
  178.             } //end nosocket check
  179.  
  180.  
  181.        
  182.        
  183.         } //end blank & nofooterarea check
  184.         ?>
  185.         <!-- end main -->
  186.         </div>
  187.        
  188.         <?php
  189.         //display link to previeous and next portfolio entry
  190.         echo avia_post_nav();
  191.  
  192.         echo "<!-- end wrap_all --></div>";
  193.  
  194.  
  195.         if(isset($avia_config['fullscreen_image']))
  196.         { ?>
  197.             <!--[if lte IE 8]>
  198.             <style type="text/css">
  199.             .bg_container {
  200.             -ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale')";
  201.             filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale');
  202.             }
  203.             </style>
  204.             <![endif]-->
  205.         <?php
  206.             echo "<div class='bg_container' style='background-image:url(".$avia_config['fullscreen_image'].");'></div>";
  207.         }
  208.     ?>
  209.  
  210.  
  211. <?php
  212.  
  213.  
  214.  
  215.  
  216.     /* Always have wp_footer() just before the closing </body>
  217.      * tag of your theme, or you will break many plugins, which
  218.      * generally use this hook to reference JavaScript files.
  219.      */
  220.  
  221.  
  222.     wp_footer();
  223.  
  224.  
  225. ?>
  226. <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>
  227.  
  228. <div id="fb-root"></div>
  229. </body>
  230. </html>
Advertisement
Add Comment
Please, Sign In to add comment