Skip to content

Commit

Permalink
Bumps version to 1.4.2.
Browse files Browse the repository at this point in the history
Fixes critical bug that would prevent menus from showing.
  • Loading branch information
Connor Bär committed Sep 21, 2016
1 parent 5ea3f43 commit 66fcd26
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Install by running `npm install`
node_modules/

# Run `gulp` to generate the build directory.
build/
# Run `gulp` to generate the theme directory.
uwc-website/

# Run `gulp dist` to generate the distribution directory.
dist/
dist/
16 changes: 8 additions & 8 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function ( $matches ) {
*/
function uwc_website_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) {
if ( ! isset( $args->sub_menu ) ) {
return;
return $sorted_menu_items;
}
$root_id = 0;
// Find the current menu item.
Expand All @@ -87,12 +87,12 @@ function uwc_website_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) {
// Find the top level parent.
if ( ! isset( $args->direct_parent ) ) {
$prev_root_id = $root_id;
while ( 0 != $prev_root_id ) {
while ( 0 !== $prev_root_id ) {
foreach ( $sorted_menu_items as $menu_item ) {
if ( $menu_item->ID == $prev_root_id ) {
if ( $menu_item->ID === $prev_root_id ) {
$prev_root_id = $menu_item->menu_item_parent;
// Don't set the root_id to 0 if we've reached the top of the menu.
if ( 0 != $prev_root_id ) { $root_id = $menu_item->menu_item_parent;
if ( 0 !== $prev_root_id ) { $root_id = $menu_item->menu_item_parent;
}
break;
}
Expand All @@ -103,17 +103,17 @@ function uwc_website_wp_nav_menu_objects_sub_menu( $sorted_menu_items, $args ) {
$menu_item_parents = array();
foreach ( $sorted_menu_items as $key => $item ) {
// Init menu_item_parents.
if ( $item->ID == $root_id ) { $menu_item_parents[] = $item->ID;
if ( $item->ID === $root_id ) { $menu_item_parents[] = $item->ID;
}

if ( in_array( $item->menu_item_parent, $menu_item_parents ) ) {
if ( in_array( $item->menu_item_parent, $menu_item_parents, true ) ) {
// Part of sub-tree: keep!
$menu_item_parents[] = $item->ID;
} elseif ( ! ( isset( $args->show_parent ) && in_array( $item->ID, $menu_item_parents ) ) ) {
} elseif ( ! ( isset( $args->show_parent ) && in_array( $item->ID, $menu_item_parents, true ) ) ) {
// Not part of sub-tree: away with it!
unset( $sorted_menu_items[ $key ] );
}
return $sorted_menu_items;
}
return $sorted_menu_items;
}
add_filter( 'wp_nav_menu_objects', 'uwc_website_wp_nav_menu_objects_sub_menu', 10, 2 );
Binary file modified languages/de_DE.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion languages/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: UWC Website\n"
"Report-Msgid-Bugs-To: https://github.com/uwc/uwc-website/issues\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2016-09-20 08:38+0200\n"
"PO-Revision-Date: 2016-09-21 10:08+0200\n"
"Last-Translator: Connor Bär <[email protected]>\n"
"Language-Team: Made by Connor. <[email protected]>\n"
"Language: de_DE\n"
Expand Down
16 changes: 5 additions & 11 deletions readme.txt → readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Build Status](https://travis-ci.org/uwc/uwc-website.svg?branch=development)](https://travis-ci.org/uwc/uwc-website)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c8129049d7374429b9fa6c88fff60376)](https://www.codacy.com/app/connor_baer/uwc-website)
[![Build Status](https://travis-ci.org/uwc/uwc-website.svg?branch=development)](https://travis-ci.org/uwc/uwc-website) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/c8129049d7374429b9fa6c88fff60376)](https://www.codacy.com/app/connor_baer/uwc-website)

# A WordPress template for UWC websites.

Expand All @@ -11,7 +10,7 @@ Requires at least: WordPress 4.5

Tested up to: WordPress 4.6.1

Version: 1.4.1
Version: 1.4.2

License: [MIT](#copyright)

Expand All @@ -23,7 +22,6 @@ Tags: custom-menu, editor-style, featured-image-header, featured-images, post-fo

If you are interested in contributing to the development, [drop me a line](mailto:[email protected]).


## Installation

> This theme can only be installed on self-hosted WordPress installations and not on sites that are hosted on wordpress.com.
Expand All @@ -35,24 +33,20 @@ If you are interested in contributing to the development, [drop me a line](mailt
5. Go to https:// for a guide on how to customize this theme.
6. Navigate to Appearance > Customize in your admin panel and customize to taste.


## Copyright

The MIT License (MIT)
Copyright (c) 2016 Connor Bär
The MIT License (MIT) Copyright (c) 2016 Connor Bär

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
--------------------------------------------------------------------------------

UWC Website theme bundles the following third-party resources:

HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas
Licenses: MIT/GPL2
Source: https://github.com/aFarkas/html5shiv
HTML5 Shiv v3.7.0, Copyright 2014 Alexander Farkas Licenses: MIT/GPL2 Source: <https://github.com/aFarkas/html5shiv>

...and others to be added.
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66fcd26

Please sign in to comment.