���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/elirickard.com/wp-content/themes/micdrop/inc/nav-menu/helper.php
���ѧ٧ѧ�
<?php if ( ! function_exists( 'micdrop_nav_item_classes' ) ) { /** * Function that add additional classes for menu items * * @param array $classes The CSS classes that are applied to the menu item's `<li>` element. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. * * @return array */ function micdrop_nav_item_classes( $classes, $item, $args, $depth ) { if ( 0 === $depth && in_array( 'menu-item-has-children', $item->classes, true ) ) { $classes[] = 'qodef-menu-item--narrow'; } return $classes; } add_filter( 'nav_menu_css_class', 'micdrop_nav_item_classes', 10, 4 ); } if ( ! function_exists( 'micdrop_add_nav_item_icon' ) ) { /** * Function that add additional element after the menu title * * @param string $title The menu item's title. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. * * @return string */ function micdrop_add_nav_item_icon( $title, $item, $args, $depth ) { $is_mobile_menu = isset( $args->menu_area ) && 'mobile' === $args->menu_area; if ( in_array( 'menu-item-has-children', $item->classes, true ) && ! $is_mobile_menu ) { $title .= micdrop_get_svg_icon( 'menu-arrow-right', 'qodef-menu-item-arrow' ); } return $title; } //add_filter( 'nav_menu_item_title', 'micdrop_add_nav_item_icon', 10, 4 ); } if ( ! function_exists( 'micdrop_add_menu_nav_item_icon' ) ) { /** * Function that add additional element after the menu title * * @param string $title The menu item's title. * @param WP_Post $item The current menu item. * @param stdClass $args An object of wp_nav_menu() arguments. * @param int $depth Depth of menu item. Used for padding. * * @return string */ function micdrop_add_menu_nav_item_icon( $title, $item, $args, $depth ) { $is_mobile_menu = isset( $args->menu_area ) && 'mobile' === $args->menu_area; $drop_down_icon = ''; if ( in_array( 'menu-item-has-children', $item->classes, true ) && ! $is_mobile_menu ) { $drop_down_icon = micdrop_get_svg_icon( 'menu-arrow-right', 'qodef-menu-item-arrow' ); } return $drop_down_icon; } add_filter( 'nav_menu_drop_down_icon', 'micdrop_add_menu_nav_item_icon', 10, 4 ); } if ( ! function_exists( 'micdrop_add_mobile_nav_item_icon' ) ) { /** * Function that add additional element after the mobile menu item title * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $item The current menu item. * @param int $depth Depth of menu item. Used for padding. * * @return string */ function micdrop_add_mobile_nav_item_icon( $args, $item, $depth ) { $is_mobile_menu = isset( $args->menu_area ) && 'mobile' === $args->menu_area; $args->after = ''; if ( in_array( 'menu-item-has-children', $item->classes, true ) && $is_mobile_menu ) { $args->after = micdrop_get_svg_icon( 'menu-arrow-right', 'qodef-menu-item-arrow' ); } return $args; } add_filter( 'nav_menu_item_args', 'micdrop_add_mobile_nav_item_icon', 10, 3 ); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�