Skip to content

Commit

Permalink
v 3.10.3
Browse files Browse the repository at this point in the history
- add support for classnames in wputh_get_menu_items helper.
  • Loading branch information
Darklg committed Dec 18, 2023
1 parent ce5c5b0 commit 3e2a338
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions inc/theme/utilities/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,17 @@ function wputh_get_menu_items($menu_id, $args = array()) {

$attributes = '';
if ($item->xfn) {
$attributes .= ' rel="' . $item->xfn . '"';
$attributes .= ' rel="' . esc_attr($item->xfn) . '"';
}
if ($item->target) {
$attributes .= ' target="' . $item->target . '"';
$attributes .= ' target="' . esc_attr($item->target) . '"';
}

if ($item->classes) {
$item_classname = trim(implode(' ', $item->classes));
if ($item_classname) {
$attributes .= ' class="' . esc_attr($item_classname) . '"';
}
}
$menu_items[] = '<a ' . $attributes . ' href="' . $item->url . '"><span>' . $item->title . '</span></a>';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wputheme",
"version": "3.10.2",
"version": "3.10.3",
"description": "WPUTheme",
"dependencies": {},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Theme Name: WP Utilities Base Theme
Theme URI: https://github.com/WordPressUtilities/WPUTheme
Update URI: https://github.com/WordPressUtilities/WPUTheme
Description: A Framework WordPress Theme
Version: 3.10.2
Version: 3.10.3
Author: Darklg
Author URI: https://darklg.me/
License: GPLv2 or later
Expand Down

0 comments on commit 3e2a338

Please sign in to comment.