Exemplo n.º 1
0
 function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0)
 {
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $class_names = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     $classes[] = 'menu-item-' . $item->ID;
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item, $args));
     $class_names = ' class="' . esc_attr($class_names) . '"';
     $id = apply_filters('nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args);
     $id = $id ? ' id="' . esc_attr($id) . '"' : '';
     $atts = apply_filters('enlightenment_nav_menu_item_attributes', array(), $item, $args);
     $attributes = enlightenment_extra_atts($atts);
     $output .= $indent . '<li' . $id . $class_names . $attributes . '>';
     $atts = array();
     $atts['title'] = !empty($item->attr_title) ? $item->attr_title : '';
     $atts['target'] = !empty($item->target) ? $item->target : '';
     $atts['rel'] = !empty($item->xfn) ? $item->xfn : '';
     $atts['href'] = !empty($item->url) ? $item->url : '';
     $atts = apply_filters('nav_menu_link_attributes', $atts, $item, $args);
     $attributes = enlightenment_extra_atts($atts);
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= apply_filters('enlightenment_nav_menu_link_before', $args->link_before, $item);
     $item_output .= apply_filters('the_title', $item->title, $item->ID);
     $item_output .= apply_filters('enlightenment_nav_menu_link_after', $args->link_after, $item);
     $item_output .= '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
Exemplo n.º 2
0
function enlightenment_footer_extra_atts($args = null)
{
    $defaults = array('atts' => ' role="contentinfo"', 'echo' => true);
    $defaults = apply_filters('enlightenment_footer_extra_atts_args', $defaults);
    $args = wp_parse_args($args, $defaults);
    return enlightenment_extra_atts($args['atts'], $args['echo']);
}