Removing off canvas to test issues with site going down
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 15:30:21 +0000 (11:30 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 15:30:21 +0000 (11:30 -0400)
functions.php
parts/off-canvas-menu.php

index 9e29f9e..7ef15bd 100644 (file)
@@ -45,63 +45,7 @@ function glm_get_menu_options()
     }
     return $menu_options;
 }
-if ( ! function_exists( 'bpla_mobile_off_canvas' ) ) {
-  function bpla_mobile_off_canvas() {
-      echo '<ul class="left-off-canvas-list">';
-      echo '<li class="page_item"><a href="' . get_bloginfo('url') . '">Home</a></li>';
-      wp_nav_menu(array(
-          'container' => false,                           // remove nav container
-          'container_class' => '',                        // class of container
-          'menu' => '',                                   // menu name
-          'menu_class' => 'off-canvas-list',              // adding custom nav class
-          'theme_location' => 'top-bar',        // where it's located in the theme
-          'before' => '',                                 // before each link <a>
-          'after' => '',                                  // after each link </a>
-          'link_before' => '',                            // before each link text
-          'link_after' => '',                             // after each link text
-          'depth' => 5,                                   // limit the depth of the nav
-          'fallback_cb' => false,                         // fallback function (see below)
-          'items_wrap' => '%3$s',
-          'walker' => new Shipwreck_Offcanvas_Walker()
-      ));
-      echo '</ul>';
-  }
-}
-if ( ! class_exists( 'Bpla_Offcanvas_Walker' ) ) :
-class Bpla_Offcanvas_Walker extends Walker_Nav_Menu {
-
-    function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
-        $element->has_children = ! empty( $children_elements[ $element->ID ] );
-        $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : '';
-        $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'page_item_has_children' : '';
-        $element->classes[] = 'page_item';
 
-        parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
-    }
-
-    function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
-        $item_html = '';
-        parent::start_el( $item_html, $object, $depth, $args );
-
-        $classes = empty( $object->classes ) ? array() : (array) $object->classes;
-
-        if ( in_array( 'label', $classes ) ) {
-            $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
-        }
-
-        $output .= $item_html;
-    }
-
-    function start_lvl( &$output, $depth = 0, $args = array() ) {
-        $output .= "\n<ul class=\"children\">\n";
-    }
-
-    function end_lvl(&$output, $depth = 0, $args = array()){
-        $output .= '</ul>';
-    }
-
-}
-endif;
 /**
  * glm_page_menu
  *
index a15e505..3bd40a0 100644 (file)
@@ -1,5 +1,5 @@
 <aside class="left-off-canvas-menu hide-for-large-up">
-    <?php bpla_mobile_off_canvas_menu(); ?>
+    <?php glm_offcanvas_menu(); ?>
     <ul class="offcavas-social-list">
         <li><a class="tweet" href="https://twitter.com/bigpowderhorn/ "></a></li>
         <li><a target="_blank" class="facebook" href="https://www.facebook.com/BigPowderhornLodging/ "></a></li>