small fixes

This commit is contained in:
2019-07-01 03:31:24 +02:00
parent 48e247e0f9
commit 98e0282821
9 changed files with 388 additions and 372 deletions

View File

@@ -1,7 +1,6 @@
<?php
/*
* Author: Todd Motto | @toddmotto
* URL: dis2019.com | @dis2019
* Original author: Todd Motto | @toddmotto
* Custom functions, support, custom post types and more.
*/
@@ -30,6 +29,7 @@ if (function_exists('add_theme_support')) {
add_image_size('small', 120, '', true); // Small Thumbnail
add_image_size('home-big-thumbnail', 1024, 1024, true); // Custom Thumbnail Size call using the_post_thumbnail('home-thumbnail');
add_image_size('home-small-thumbnail', 256, 256, true); // Custom Thumbnail Size call using the_post_thumbnail('home-thumbnail');
add_image_size('home-event-thumbnail', 1024, 512, true);
// Add Support for Custom Backgrounds - Uncomment below if you're going to use
/*add_theme_support('custom-background', array(
@@ -87,37 +87,37 @@ function dis2019_nav()
}
//walker for tag menu: bedo circle hover
class Menu_With_Description extends Walker_Nav_Menu
{
public function start_el(&$output, $item, $depth, $args)
{
global $wp_query;
$indent = ($depth) ? str_repeat("\t", $depth) : '';
// class Menu_With_Description extends Walker_Nav_Menu
// {
// public function start_el(&$output, $item, $depth, $args)
// {
// global $wp_query;
// $indent = ($depth) ? str_repeat("\t", $depth) : '';
$class_names = $value = '';
// $class_names = $value = '';
$classes = empty($item->classes) ? array() : (array) $item->classes;
// $classes = empty($item->classes) ? array() : (array) $item->classes;
$class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
$class_names = ' class="' . esc_attr($class_names) . ' tag-' . $item->title . '"';
// $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
// $class_names = ' class="' . esc_attr($class_names) . ' tag-' . $item->title . '"';
$output .= $indent . '<li id="menu-item-' . $item->ID . '"' . $value . $class_names . '>';
// $output .= $indent . '<li id="menu-item-' . $item->ID . '"' . $value . $class_names . '>';
$attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
$attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
$attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
$attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
// $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
// $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
// $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
// $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
$item_output = $args->before;
$item_output .= '<a' . $attributes . '>';
$item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
$item_output .= '</a>';
$item_output .= '<span class="sub menu-item-sub-' . $item->ID . '">' . $item->description . '</span>';
$item_output .= $args->after;
// $item_output = $args->before;
// $item_output .= '<a' . $attributes . '>';
// $item_output .= $args->link_before . apply_filters('the_title', $item->title, $item->ID) . $args->link_after;
// $item_output .= '</a>';
// $item_output .= '<span class="sub menu-item-sub-' . $item->ID . '">' . $item->description . '</span>';
// $item_output .= $args->after;
$output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
}
}
// $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
// }
// }
// Load dis-2019 scripts (header.php)
function dis2019_header_scripts()
@@ -204,6 +204,7 @@ function register_dis_menu()
'header-menu' => __('Header Menu', 'dis2019'), // Main Navigation
// 'sidebar-menu' => __('Sidebar Menu', 'dis2019'), // Sidebar Navigation
'tag-menu' => __('Tag Menu', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
'right-menu' => __('Right Menu', 'dis2019'), // Extra Navigation if needed (duplicate as many as you need!)
));
}