footer.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?php
  2. /**
  3. * The template for displaying the footer.
  4. *
  5. * Contains the closing of the #content div and all content after.
  6. *
  7. * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
  8. *
  9. * @package Pen
  10. */
  11. pen_sidebar_get( 'sidebar-left' );
  12. pen_sidebar_get( 'sidebar-right' );
  13. ?>
  14. </div><!-- #content -->
  15. </div><!-- .pen_container -->
  16. <?php
  17. pen_html_jump_menu( 'site' );
  18. ?>
  19. </div><!-- #pen_section -->
  20. <?php
  21. pen_sidebar_get( 'sidebar-bottom' );
  22. $connect_html = pen_html_connect( 'footer' );
  23. $connect_display = $connect_html ? 'show' : 'hide';
  24. $classes_footer = trim(
  25. implode(
  26. ' ',
  27. array_filter(
  28. array(
  29. 'site-footer',
  30. 'pen_html_connect_' . sanitize_html_class( $connect_display ),
  31. pen_option_get( 'color_footer_background_transparent' ) ? 'pen_is_transparent' : 'pen_not_transparent',
  32. )
  33. )
  34. )
  35. );
  36. ?>
  37. <footer id="pen_footer" class="<?php echo esc_attr( $classes_footer ); ?>" role="contentinfo">
  38. <div class="pen_container">
  39. <?php
  40. pen_sidebar_get( 'sidebar-footer-left' );
  41. ?>
  42. <div class="pen_footer_inner">
  43. <?php
  44. pen_sidebar_get( 'sidebar-footer-top' );
  45. if ( pen_option_get( 'footer_menu_display' ) ) {
  46. $menu_html = wp_nav_menu(
  47. array(
  48. 'theme_location' => 'secondary',
  49. 'menu_id' => 'secondary-menu',
  50. 'echo' => false,
  51. 'fallback_cb' => 'pen_html_footer_menu_fallback',
  52. )
  53. );
  54. if ( '' !== trim( $menu_html ) ) {
  55. ?>
  56. <nav id="pen_footer_menu" role="navigation" class="<?php pen_class_animation( 'footer_menu' ); ?>" aria-label="<?php esc_attr_e( 'Footer Menu', 'pen' ); ?>">
  57. <?php
  58. echo $menu_html; /* phpcs:ignore */
  59. ?>
  60. </nav>
  61. <?php
  62. }
  63. }
  64. $phone_html = pen_option_get( 'phone', false );
  65. if ( $phone_html && pen_option_get( 'phone_footer_display' ) ) {
  66. ?>
  67. <div class="pen_phone <?php pen_class_animation( 'phone_footer' ); /* phpcs:ignore */ ?>">
  68. <a href="tel:<?php echo esc_attr( $phone_html ); ?>">
  69. <?php
  70. echo esc_html( $phone_html );
  71. ?>
  72. </a>
  73. </div>
  74. <?php
  75. }
  76. echo $connect_html; /* phpcs:ignore */
  77. get_template_part( 'partials/content', 'copyright' );
  78. pen_sidebar_get( 'sidebar-footer-bottom' );
  79. ?>
  80. </div>
  81. <?php
  82. pen_sidebar_get( 'sidebar-footer-right' );
  83. ?>
  84. </div>
  85. <?php
  86. pen_html_jump_menu( 'footer' );
  87. ?>
  88. </footer><!-- #pen_footer -->
  89. </div><!-- .pen_wrapper -->
  90. </div><!-- #page -->
  91. <a id="pen_back" href="#page" title="<?php esc_attr_e( 'Back to top', 'pen' ); ?>"<?php echo ( ! pen_option_get( 'footer_back_to_top_display' ) ) ? ' class="screen-reader-text' : ''; /* phpcs:ignore */ ?>>
  92. <span class="screen-reader-text">
  93. <?php
  94. esc_html_e( 'Back to top', 'pen' );
  95. ?>
  96. </span>
  97. </a>
  98. <?php
  99. wp_footer();
  100. ?>
  101. <!-- Global site tag (gtag.js) - Google Analytics -->
  102. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-141610064-1"></script>
  103. <script>
  104. window.dataLayer = window.dataLayer || [];
  105. function gtag(){dataLayer.push(arguments);}
  106. gtag('js', new Date());
  107. gtag('config', 'UA-141610064-1');
  108. </script>
  109. </body>
  110. </html>
  111. <?php
  112. ob_end_flush();