Fix for errors
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 22 Jul 2015 14:59:35 +0000 (10:59 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 22 Jul 2015 14:59:35 +0000 (10:59 -0400)
also add new form page for side bar exclusion

functions.php
page.php
parts/nav-menu-dropdown.php
parts/right-sidebar.php

index 77d54cb..d397a97 100644 (file)
@@ -222,8 +222,8 @@ function glm_side_menu() {
                 }
             }
         } else {
-            $thisPageMenuId = $pageMenuId[0]->ID;
-            $thisPageMenuParent = $pageMenuId[0]->menu_item_parent;
+            $thisPageMenuId = (isset($pageMenuId[0])) ? $pageMenuId[0]->ID : 0;
+            $thisPageMenuParent = (isset($pageMenuId[0])) ? $pageMenuId[0]->menu_item_parent : 0;
         }
         // does the current page (in the menu) have sub menu items?
         if (isset($sideMenu[$thisPageMenuId]) && !empty($sideMenu[$thisPageMenuId])) {
index 0fb9461..0fea665 100644 (file)
--- a/page.php
+++ b/page.php
@@ -2,7 +2,10 @@
                 <main>
                     <div class="row" data-equalizer>
                         <?php get_sidebar(); ?>
-                        <?php if (get_the_block( 'sidebar' ) != "" && $name != "request-brochures" && $name != "contact-us") { ?>
+                        <?php if (get_the_block( 'sidebar' ) != ""
+                            && $name != "request-brochures"
+                            && $name != "contact-us"
+                            && $name != "tips-hotline") { ?>
                         <div id="content-bulk" class="small-12 large-6 columns" data-equalizer-watch>
                         <?php } else { ?>
                         <div id="content-bulk" class="small-12 large-9 columns" data-equalizer-watch>
index 917b005..10597e5 100644 (file)
  * @license      http://opensource.org/licenses/gpl-2.0.php GNU Public License
  *
  */
+
 class Walker_Nav_Menu_Dropdown extends Walker_Nav_Menu {
-       function start_lvl(&$output, $depth){
-               $indent = str_repeat("\t", $depth); // don't output children opening tag (`<ul>`)
-       }
+    function start_lvl( &$output, $depth = 0, $args = array() ){
+        $indent = str_repeat("\t", $depth); // don't output children opening tag (`<ul>`)
+    }
 
-       function end_lvl(&$output, $depth){
-               $indent = str_repeat("\t", $depth); // don't output children closing tag
-       }
+    function end_lvl( &$output, $depth = 0, $args = array() ){
+        $indent = str_repeat("\t", $depth); // don't output children closing tag
+    }
 
-       /**
-       * Start the element output.
-       *
-       * @param  string $output Passed by reference. Used to append additional content.
-       * @param  object $item   Menu item data object.
-       * @param  int $depth     Depth of menu item. May be used for padding.
-       * @param  array $args    Additional strings.
-       * @return void
-       */
-       function start_el(&$output, $item, $depth, $args) {
-               $url = '#' !== $item->url ? $item->url : '';
-               $output .= '<option value="' . $url . '">' . $item->title;
-       }       
+    /**
+    * Start the element output.
+    *
+    * @param  string $output Passed by reference. Used to append additional content.
+    * @param  object $item   Menu item data object.
+    * @param  int $depth     Depth of menu item. May be used for padding.
+    * @param  array $args    Additional strings.
+    * @return void
+    */
+    function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0) {
+        $url = '#' !== $item->url ? $item->url : '';
+        $output .= '<option value="' . $url . '">' . $item->title;
+    }
 
-       function end_el(&$output, $item, $depth){
-               $output .= "</option>\n"; // replace closing </li> with the option tag
-       }
+    function end_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0){
+        $output .= "</option>\n"; // replace closing </li> with the option tag
+    }
 }
index 2218182..61c4d2b 100644 (file)
@@ -1,5 +1,5 @@
 <div id="extra" class="large-3 columns show-for-large-up">
-<?php 
+<?php
 echo get_the_block( 'sidebar', array(
     'label'         => __( '<h2>Enter your Sidebar content here. Leave this area'
             . 'blank to remove the sidebar area.<h2>', 'text-domain' ),
@@ -7,4 +7,4 @@ echo get_the_block( 'sidebar', array(
     'apply_filters' => true,
 ) );
 ?>
-</div>
\ No newline at end of file
+</div>