db_fields = $fields; } } function start_lvl(&$output, $depth) { $indent = str_repeat("\t", $depth); $output .= "\n$indent"; } /** * @see Walker::start_el() * @since WP 3.0.0 * * @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. Used for padding. * @param object $args */ function start_el(&$output, $item, $depth, $args) { global $_nav_menu_placeholder; $array_TwoclickSettings = get_option('twoclick_buttons_settings'); if(is_array($array_TwoclickSettings)) { if(is_array($array_TwoclickSettings['twoclick_buttons_exclude_page'])) { $array_ExcludePages = $array_TwoclickSettings['twoclick_buttons_exclude_page']; } } $_nav_menu_placeholder = (0 > $_nav_menu_placeholder) ? intval($_nav_menu_placeholder) - 1 : -1; $possible_object_id = isset($item->post_type) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_nav_menu_placeholder; $possible_db_id = (!empty($item->ID)) && (0 < $possible_object_id) ? (int) $item->ID : 0; $indent = ($depth) ? str_repeat("\t", $depth) : ''; $output .= $indent . '
  • '; $output .= '
    view
    '; } }