'ffffff', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support('custom-background', $args); # add custom header $args = array( 'default-image'=>'', 'random-default'=>false, 'width'=>0, 'height'=>0, 'flex-height'=> false, 'flex-width'=> false, 'default-text-color'=> '', 'header-text'=> false, 'uploads'=> true, 'wp-head-callback'=> '', 'admin-head-callback'=> '', 'admin-preview-callback' => '' ); add_theme_support('custom-header', $args); register_nav_menus( array( 'main-menu' => esc_html__('Main Menu', 'alagu'), ) ); # Gutenberg Compatible add_theme_support( 'align-wide' ); add_theme_support( 'wp-block-styles' ); add_theme_support( 'editor-styles' ); // Add support for responsive embedded content. add_theme_support( 'responsive-embeds' ); } add_action('after_setup_theme', 'alagu_features'); } /* --------------------------------------------------------------------------- * Register Widget Area For Theme * --------------------------------------------------------------------------- */ if( !function_exists( 'alagu_widget_areas' ) ) { function alagu_widget_areas() { // Define sidebars array $sidebars = array( 'standard-sidebar-left' => esc_html__( 'Standard | Left Sidebar', 'alagu' ), 'standard-sidebar-right' => esc_html__( 'Standard | Right Sidebar', 'alagu' ), ); if( class_exists('Tribe__Events__Main') ): $sidebars['events-everywhere-sidebar-left'] = esc_html__('Events | Left Sidebar', 'alagu'); $sidebars['events-everywhere-sidebar-right'] = esc_html__('Events | Right Sidebar', 'alagu'); endif; $page_layout = alagu_get_option( 'blog-archives-page-layout' ); $page_layout = !empty( $page_layout ) ? $page_layout : "content-full-width"; switch($page_layout) : case 'with-left-sidebar': $sidebars['post-archives-sidebar-left'] = esc_html__("Post Archives | Left Sidebar",'alagu'); break; case 'with-right-sidebar': $sidebars['post-archives-sidebar-right'] = esc_html__("Post Archives | Right Sidebar",'alagu'); break; case 'with-both-sidebar': $sidebars['post-archives-sidebar-left'] = esc_html__("Post Archives | Left Sidebar",'alagu'); $sidebars['post-archives-sidebar-right'] = esc_html__("Post Archives | Right Sidebar",'alagu'); break; endswitch; $footer = alagu_get_option( 'default-footer-option', '' ); if( $footer == 'column' || $footer == 'column-text' ) { $sidebars['footer-column-1'] = esc_html__("Footer Column 1",'alagu'); $sidebars['footer-column-2'] = esc_html__("Footer Column 2",'alagu'); $sidebars['footer-column-3'] = esc_html__("Footer Column 3",'alagu'); } // Apply filters - makes it easier to register new sidebars $sidebars = apply_filters( 'dttheme_register_sidebars_array', $sidebars ); // Register sidebars if ( $sidebars ) { $tag = alagu_get_option( 'widget-title-tag', 'h3' ); $title = alagu_get_option( 'widget-title-style' ); $before_title = '<'.$tag.' class="widgettitle">'; $after_title = ''; if( $title == 'type17' ) { $before_title = '
<'.$tag.' class="widgettitle">'; $after_title = '
'; } foreach ( $sidebars as $id => $name ) { register_sidebar( array( 'name' => $name, 'id' => $id, 'before_widget' => '', 'before_title' => $before_title, 'after_title' => $after_title, ) ); } } } add_action( 'widgets_init', 'alagu_widget_areas' ); } /* --------------------------------------------------------------------------- * Under Construction * --------------------------------------------------------------------------- */ if( ! function_exists('alagu_under_construction') ){ function alagu_under_construction(){ if( ! is_user_logged_in() && ! is_admin() && ! is_404() ) { get_template_part('tpl-comingsoon'); exit(); } } } if( alagu_get_option( 'enable-comingsoon' ) ): add_action('template_redirect', 'alagu_under_construction', 30); // getting shortcode css ---------------------- add_action('wp_enqueue_scripts', 'alagu_rand_css', 101); function alagu_rand_css() { $id = alagu_get_option( 'comingsoon-pageid' ); if ( $id ) { $shortcodes_custom_css = get_post_meta( $id, '_wpb_shortcodes_custom_css', true ); if ( ! empty( $shortcodes_custom_css ) ) { wp_register_style( 'vc_shortcodes-custom-'.$id, '', false, ALAGU_THEME_VERSION, 'all' ); wp_enqueue_style( 'vc_shortcodes-custom-'.$id ); wp_add_inline_style( 'vc_shortcodes-custom-'.$id, $shortcodes_custom_css ); } } } endif; /* --------------------------------------------------------------------------- * Set Max Content Width * --------------------------------------------------------------------------- */ if ( ! isset( $content_width ) ) $content_width = 1170; /* --------------------------------------------------------------------------- * Filter to modify default category widget view * --------------------------------------------------------------------------- */ if( !function_exists('alagu_wp_list_categories') ){ function alagu_wp_list_categories( $output ){ if (strpos($output, "") <= 0) { $output = str_replace(' (', ' ', $output); $output = str_replace(')', ' ', $output); } return $output; } add_filter('wp_list_categories', 'alagu_wp_list_categories'); } /* --------------------------------------------------------------------------- * Filter to modify default list archive widget view * --------------------------------------------------------------------------- */ if( !function_exists('alagu_wp_list_archive') ){ function alagu_wp_list_archive( $link_html,$url, $text, $format, $before, $after ) { if( $format == 'html' ) { $link_html = "\t
  • $before$text $after
  • \n"; } return $link_html; } add_filter('get_archives_link', 'alagu_wp_list_archive', 10, 6); } /* --------------------------------------------------------------------------- * Filter to execute shortcode inside contact form7 * --------------------------------------------------------------------------- */ if( !function_exists('alagu_wpcf7_form_elements') ){ function alagu_wpcf7_form_elements($form) { $form = do_shortcode( $form ); return $form; } add_filter('wpcf7_form_elements', 'alagu_wpcf7_form_elements'); } /* --------------------------------------------------------------------------- * Pagination for Blog and Portfolio * --------------------------------------------------------------------------- */ function alagu_pagination( $query = false, $load_more = false ){ global $wp_query; $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : ( ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1 ); // default $wp_query if( $query ) { $custom_query = $query; } else { $custom_query = $wp_query; } $custom_query->query_vars['paged'] > 1 ? $current = $custom_query->query_vars['paged'] : $current = 1; if( empty( $paged ) ) $paged = 1; $prev = $paged - 1; $next = $paged + 1; $end_size = 1; $mid_size = 2; $show_all = alagu_get_option( 'showall-pagination' ); $dots = false; if( ! $total = $custom_query->max_num_pages ) $total = 1; $output = ''; if( $total > 1 ) { if( $load_more ){ // ajax load more ------------------------------------------------- if( $paged < $total ){ $output .= '
    '; $output .= ''; $output .= ''; $output .= ''. esc_html__('Load more', 'alagu') .''; $output .= ''; $output .= '
    '; } } else { // default -------------------------------------------------------- $output .= '
    '; $big = 999999999; // need an unlikely integer $args = array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'total' => $custom_query->max_num_pages, 'current' => max( 1, get_query_var('paged') ), 'show_all' => $show_all, 'end_size' => $end_size, 'mid_size' => $mid_size, 'prev_next' => true, 'prev_text' => ''.esc_html__('Prev', 'alagu'), 'next_text' => esc_html__('Next', 'alagu').'', 'type' => 'list' ); $output .= paginate_links( $args ); $output .= '
    '."\n"; } } return $output; } function alagu_events_title() { global $wp_query; $title = ''; $date_format = apply_filters( 'tribe_events_pro_page_title_date_format', 'l, F jS Y' ); if( tribe_is_month() && !is_tax() ) { $title = sprintf( esc_html__( 'Events for %s', 'alagu' ), date_i18n( 'F Y', strtotime( tribe_get_month_view_date() ) ) ); } elseif( class_exists('Tribe__Events__Pro__Main') && tribe_is_week() ) { $title = sprintf( esc_html__('Events for week of %s', 'alagu'), date_i18n( $date_format, strtotime( tribe_get_first_week_day($wp_query->get('start_date') ) ) ) ); } elseif( class_exists('Tribe__Events__Pro__Main') && tribe_is_day() ) { $title = esc_html__( 'Events for', 'alagu' ) . ' ' . date_i18n( $date_format, strtotime( $wp_query->get('start_date') ) ); } elseif( class_exists('Tribe__Events__Pro__Main') && (tribe_is_map() || tribe_is_photo()) ) { if( tribe_is_past() ) { $title = esc_html__( 'Past Events', 'alagu' ); } else { $title = esc_html__( 'Upcoming Events', 'alagu' ); } } elseif( tribe_is_list_view() ) { $title = esc_html__('Upcoming Events', 'alagu'); } elseif (is_single()) { $title = $wp_query->post->post_title; } elseif( tribe_is_month() && is_tax() ) { $term_slug = $wp_query->query_vars['tribe_events_cat']; $term = get_term_by('slug', $term_slug, 'tribe_events_cat'); $name = $term->name; $title = $name; } elseif( is_tag() ) { $title = esc_html__('Tag Archives','alagu'); } return $title; } /* --------------------------------------------------------------------------- * Excerpt * --------------------------------------------------------------------------- */ function alagu_excerpt($limit = NULL) { $limit = !empty($limit) ? $limit : 10; $excerpt = explode(' ', get_the_excerpt(), $limit); $excerpt = array_filter($excerpt); if (!empty($excerpt)) { if (count($excerpt) >= $limit) { array_pop($excerpt); $excerpt = implode(" ", $excerpt).'...'; } else { $excerpt = implode(" ", $excerpt); } $excerpt = preg_replace('`\[[^\]]*\]`', '', $excerpt); $excerpt = str_replace(' ', '', $excerpt); if(!empty ($excerpt)) return "

    {$excerpt}

    "; } } /* --------------------------------------------------------------------------- * WordPress wp_kses function for allowed html * --------------------------------------------------------------------------- */ function alagu_wp_kses($content) { $dt_allowed_html_tags = array( 'a' => array('class' => array(), 'data-product_id' => array(), 'href' => array(), 'title' => array(), 'target' => array(), 'id' => array(), 'data-post-id' => array(), 'data-gal' => array(), 'data-image' => array(), 'rel' => array()), 'abbr' => array('title' => array()), 'address' => array(), 'area' => array('shape' => array(), 'coords' => array(), 'href' => array(), 'alt' => array()), 'article' => array('id' => array(), 'class' => array()), 'aside' => array('id' => array(), 'class' => array()), 'audio' => array('autoplay' => array(), 'controls' => array(), 'loop' => array(), 'muted' => array(), 'preload' => array(), 'src' => array()), 'b' => array(), 'base' => array('href' => array(), 'target' => array()), 'bdi' => array(), 'bdo' => array('dir' => array()), 'blockquote' => array('cite' => array()), 'br' => array(), 'button' => array('autofocus' => array(), 'disabled' => array(), 'form' => array(), 'formaction' => array(), 'formenctype' => array(), 'formmethod' => array(), 'formnovalidate' => array(), 'formtarget' => array(), 'name' => array(), 'type' => array(), 'value' => array()), 'canvas' => array('height' => array(), 'width' => array()), 'caption' => array('align' => array()), 'cite' => array(), 'code' => array(), 'col' => array(), 'colgroup' => array(), 'datalist' => array('id' => array()), 'dd' => array(), 'del' => array('cite' => array(), 'datetime' => array()), 'details' => array('open' => array()), 'dfn' => array(), 'dialog' => array('open' => array()), 'div' => array('class' => array(), 'id' => array(), 'style' => array(), 'align' => array(), 'data-for' => array(), 'data-date' => array(), 'data-offset' => array()), 'dl' => array(), 'dt' => array(), 'em' => array(), 'embed' => array('height' => array(), 'src' => array(), 'type' => array(), 'width' => array()), 'fieldset' => array('disabled' => array(), 'form' => array(), 'name' => array()), 'figcaption' => array(), 'figure' => array(), 'form' => array('accept' => array(), 'accept-charset' => array(), 'action' => array(), 'autocomplete' => array(), 'enctype' => array(), 'method' => array(), 'name' => array(), 'novalidate' => array(), 'target' => array(), 'id' => array(), 'class' => array()), 'h1' => array('class' => array()), 'h2' => array('class' => array()), 'h3' => array('class' => array()), 'h4' => array('class' => array()), 'h5' => array('class' => array()), 'h6' => array('class' => array()), 'hr' => array(), 'i' => array('class' => array(), 'id' => array()), 'iframe' => array('name' => array(), 'seamless' => array(), 'src' => array(), 'srcdoc' => array(), 'width' => array(), 'height' => array(), 'frameborder' => array(), 'allowfullscreen' => array(), 'mozallowfullscreen' => array(), 'webkitallowfullscreen' => array(), 'title' => array()), 'img' => array('alt' => array(), 'crossorigin' => array(), 'height' => array(), 'ismap' => array(), 'src' => array(), 'usemap' => array(), 'width' => array(), 'title' => array(), 'data-default' => array()), 'input' => array('align' => array(), 'alt' => array(), 'autocomplete' => array(), 'autofocus' => array(), 'checked' => array(), 'disabled' => array(), 'form' => array(), 'formaction' => array(), 'formenctype' => array(), 'formmethod' => array(), 'formnovalidate' => array(), 'formtarget' => array(), 'height' => array(), 'list' => array(), 'max' => array(), 'maxlength' => array(), 'min' => array(), 'multiple' => array(), 'name' => array(), 'pattern' => array(), 'placeholder' => array(), 'readonly' => array(), 'required' => array(), 'size' => array(), 'src' => array(), 'step' => array(), 'type' => array(), 'value' => array(), 'width' => array(), 'id' => array(), 'class' => array()), 'ins' => array('cite' => array(), 'datetime' => array()), 'label' => array('for' => array(), 'form' => array(), 'class' => array()), 'legend' => array('align' => array()), 'li' => array('type' => array(), 'value' => array(), 'class' => array(), 'id' => array()), 'link' => array('crossorigin' => array(), 'href' => array(), 'hreflang' => array(), 'media' => array(), 'rel' => array(), 'sizes' => array(), 'type' => array()), 'main' => array(), 'map' => array('name' => array()), 'mark' => array(), 'menu' => array('label' => array(), 'type' => array()), 'menuitem' => array('checked' => array(), 'command' => array(), 'default' => array(), 'disabled' => array(), 'icon' => array(), 'label' => array(), 'radiogroup' => array(), 'type' => array()), 'meta' => array('charset' => array(), 'content' => array(), 'http-equiv' => array(), 'name' => array()), 'object' => array('form' => array(), 'height' => array(), 'name' => array(), 'type' => array(), 'usemap' => array(), 'width' => array()), 'ol' => array('class' => array(), 'reversed' => array(), 'start' => array(), 'type' => array()), 'option' => array('value' => array(), 'selected' => array()), 'p' => array('class' => array()), 'q' => array('cite' => array()), 'section' => array(), 'select' => array('autofocus' => array(), 'disabled' => array(), 'form' => array(), 'multiple' => array(), 'name' => array(), 'required' => array(), 'size' => array(), 'class' => array()), 'small' => array(), 'source' => array('media' => array(), 'src' => array(), 'type' => array()), 'span' => array('class' => array()), 'strong' => array(), 'style' => array('media' => array(), 'scoped' => array(), 'type' => array()), 'sub' => array(), 'sup' => array(), 'table' => array('sortable' => array()), 'tbody' => array(), 'td' => array('colspan' => array(), 'headers' => array()), 'textarea' => array('autofocus' => array(), 'cols' => array(), 'disabled' => array(), 'form' => array(), 'maxlength' => array(), 'name' => array(), 'placeholder' => array(), 'readonly' => array(), 'required' => array(), 'rows' => array(), 'wrap' => array()), 'tfoot' => array(), 'th' => array('abbr' => array(), 'colspan' => array(), 'headers' => array(), 'rowspan' => array(), 'scope' => array(), 'sorted' => array()), 'thead' => array(), 'time' => array('datetime' => array()), 'title' => array(), 'tr' => array(), 'track' => array('default' => array(), 'kind' => array(), 'label' => array(), 'src' => array(), 'srclang' => array()), 'u' => array(), 'ul' => array('class' => array(), 'id' => array()), 'var' => array(), 'video' => array('autoplay' => array(), 'controls' => array(), 'height' => array(), 'loop' => array(), 'muted' => array(), 'muted' => array(), 'poster' => array(), 'preload' => array(), 'src' => array(), 'width' => array()), 'wbr' => array(), ); $data = wp_kses($content, $dt_allowed_html_tags); return $data; } /** * Widget: * Before, After Widget wp_kses */ function alagu_before_after_widget ( $content ) { $allowed_html = array( 'aside' => array( 'id' => array(), 'class' => array() ), 'div' => array( 'id' => array(), 'class' => array(), ) ); $data = wp_kses( $content, $allowed_html ); return $data; } /** * Widget : Title wp_kses */ function alagu_widget_title( $content ) { $allowed_html = array( 'div' => array( 'id' => array(), 'class' => array() ), 'h2' => array( 'class' => array() ), 'h3' => array( 'class' => array() ), ); $data = wp_kses( $content, $allowed_html ); return $data; } /* --------------------------------------------------------------------------- * Theme Comment Style * --------------------------------------------------------------------------- */ function alagu_comment_style( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type ) : case 'pingback': case 'trackback': echo '
  • '; echo "

    "; esc_html_e('Pingback:', 'alagu'); comment_author_link(); edit_comment_link(esc_html__('Edit', 'alagu'), ' ', ''); echo "

    "; break; default: case '': echo "
  • '; echo '
    '; echo '
    '.get_avatar($comment, 450).'
    '; echo '
    '; echo '
    '; echo get_comment_author_link(); echo ' '; echo '
    '; echo '
    '; comment_text(); if ($comment->comment_approved == '0') : esc_html_e('Your comment is awaiting moderation.', 'alagu'); endif; edit_comment_link(esc_html__('Edit', 'alagu')); echo '
    '; echo '
    '; echo comment_reply_link(array_merge($args, array('reply_text' => esc_html__('Reply', 'alagu'), 'depth' => $depth, 'max_depth' => $args['max_depth']))); echo '
    '; echo '
    '; echo '
    '; break; endswitch; } /* --------------------------------------------------------------------------- * Custom Function To Get Page Permalink By Its Template * --------------------------------------------------------------------------- */ function alagu_get_page_permalink_by_its_template( $template ) { $permalink = '#'; $pages = get_posts( array( 'post_type' => 'page', 'meta_key' => '_wp_page_template', 'meta_value' => $template, 'suppress_filters' => false ) ); if ( is_array( $pages ) && count( $pages ) > 0 ) { $login_page = $pages[0]; $permalink = get_permalink( $login_page->ID ); } return $permalink; } /* --------------------------------------------------------------------------- * Theme show sidebar * --------------------------------------------------------------------------- */ function alagu_show_sidebar( $type, $id, $position = 'right' ) { $wtstyle = alagu_get_option( 'widget-title-style' ); $sidebars = $settings = array(); if( $type == 'page' ){ $settings = get_post_meta($id,'_tpl_default_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( empty($settings) || ( array_key_exists( 'layout', $settings ) && $settings['layout'] == 'global-site-layout' ) ) { $settings['layout'] = alagu_get_option( 'site-global-sidebar-layout' ); $settings['show-standard-sidebar-left'] = true; $settings['show-standard-sidebar-right'] = true; unset($settings['widget-area-left']); unset($settings['widget-area-right']); } } elseif( $type == 'post' ){ $settings = get_post_meta($id,'_dt_post_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( empty($settings) || ( array_key_exists( 'layout', $settings ) && $settings['layout'] == 'global-site-layout' ) ) { $settings['layout'] = alagu_get_option( 'site-global-sidebar-layout' ); $settings['show-standard-sidebar-left'] = true; $settings['show-standard-sidebar-right'] = true; unset($settings['widget-area-left']); unset($settings['widget-area-right']); } } elseif( $type == 'dt_portfolios' ){ $settings = get_post_meta($id,'_portfolio_settings',TRUE); } elseif( $type == 'tribe_events' ){ $settings = get_post_meta($id,'_custom_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( empty($settings) || ( array_key_exists( 'layout', $settings ) && $settings['layout'] == 'global-site-layout' ) ) { $settings['layout'] = alagu_get_option( 'site-global-sidebar-layout' ); $settings['show-standard-sidebar-left'] = true; $settings['show-standard-sidebar-right'] = true; unset($settings['widget-area-left']); unset($settings['widget-area-right']); } } else { $settings = get_post_meta($id,'_custom_settings',TRUE); } $settings = is_array($settings) ? $settings : array(); $active_sidebars = array(); $k = 'show-standard-sidebar-'.$position; if( array_key_exists( $k, $settings ) && $settings[$k] ){ $sidebar = 'standard-sidebar-'.$position; if( is_active_sidebar( $sidebar ) ){ array_push($active_sidebars, $sidebar ); } } $k = 'widget-area-'.$position; if( array_key_exists($k, $settings) ){ foreach($settings[$k] as $widgetarea ){ $sidebars[] = mb_convert_case($widgetarea, MB_CASE_LOWER, "UTF-8"); } } if( !empty( $sidebars ) ) { foreach( $sidebars as $sidebar ) { if( is_active_sidebar( $sidebar ) ) { array_push($active_sidebars, $sidebar ); } } } if( $active_sidebars ) { echo !empty( $wtstyle ) ? "
    " : ''; foreach( $active_sidebars as $sidebar ) { dynamic_sidebar( $sidebar ); } echo !empty( $wtstyle ) ? '
    ' : ''; return 'has-active-'.$position.'-widgetarea'; } else { return 'has-no-active-'.$position.'-widgetarea'; } } /* --------------------------------------------------------------------------- * Theme active custom widgetarea * --------------------------------------------------------------------------- */ function alagu_active_custom_widgetarea( $type, $id, $position = 'left' ) { $flag = false; $product_widget = false; if( $type == 'page' ){ $settings = get_post_meta($id,'_tpl_default_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( empty($settings) || ( array_key_exists( 'layout', $settings ) && $settings['layout'] == 'global-site-layout' ) ) { unset($settings['widget-area-left']); unset($settings['widget-area-right']); } } elseif( $type == 'post' ){ $settings = get_post_meta($id,'_dt_post_settings',TRUE); $settings = is_array( $settings ) ? array_filter( $settings ) : array(); if( empty($settings) || ( array_key_exists( 'layout', $settings ) && $settings['layout'] == 'global-site-layout' ) ) { unset($settings['widget-area-left']); unset($settings['widget-area-right']); } } elseif( $type == 'dt_portfolios' ){ $settings = get_post_meta($id,'_portfolio_settings',TRUE); } elseif( $type == 'product' ){ $settings = get_post_meta($id,'_custom_settings',TRUE); $product_widget = true; } else { $settings = get_post_meta($id,'_custom_settings',TRUE); } $settings = is_array($settings) ? $settings : array(); if($product_widget) { $k = 'product-widgetareas'; } else { $k = 'widget-area-'.$position; } if( array_key_exists($k, $settings) ){ foreach($settings[$k] as $widgetarea ){ $sidebars[] = mb_convert_case($widgetarea, MB_CASE_LOWER, "UTF-8"); } } if( !empty( $sidebars ) ) { foreach( $sidebars as $sidebar ) { if( is_active_sidebar( $sidebar ) ) { $flag = true; } } } return $flag; } /* --------------------------------------------------------------------------- * Check global variables * --------------------------------------------------------------------------- */ function alagu_global_variables($variable = '') { global $woocommerce, $product, $woocommerce_loop, $post, $wp_query, $pagenow; switch($variable) { case 'woocommerce': return $woocommerce; break; case 'product': return $product; break; case 'woocommerce_loop': return $woocommerce_loop; break; case 'post': return $post; break; case 'wp_query': return $wp_query; break; case 'pagenow': return $pagenow; break; } return false; } /* --------------------------------------------------------------------------- * Walker Page for alagu_new_wp_page_menu * --------------------------------------------------------------------------- */ class ALAGU_Walker_Page extends Walker_Page { public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } $indent = str_repeat( $t, $depth ); $output .= "{$n}{$indent}