Example #1
0
 /**
  * [display_element description]
  *
  * @param  [type]  $element           [description]
  * @param  [type]  $children_elements [description]
  * @param  [type]  $max_depth         [description]
  * @param  integer $depth             [description]
  * @param  [type]  $args              [description]
  * @param  [type]  $output            [description]
  * @return [type]                     [description]
  */
 function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
 {
     parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
 }
 /**
  * Traverse elements to create list from elements.
  *
  * Calls parent function in wp-includes/class-wp-walker.php
  */
 function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
 {
     if (!$element) {
         return;
     }
     //Add indicators for top level menu items with submenus
     $id_field = $this->db_fields['id'];
     if (!empty($children_elements[$element->{$id_field}])) {
         $this->dt_menu_parents[] = $element->{$id_field};
     }
     parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
 }
 function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output)
 {
     $id_field = $this->db_fields['id'];
     if (is_object($args[0])) {
         $args[0]->has_children = !empty($children_elements[$element->{$id_field}]);
     }
     return parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
 }