Black Friday Sale! Get $20 off GP Premium, $40 off our new Lifetime license, and 45% off license renewals/extensions! Learn more

[Resolved] GeneratePress bug in navigation.php when used with CoursePress plugin from WPMU

Home Forums Support GeneratePress bug in navigation.php when used with CoursePress plugin from WPMU

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #302475
    Göran

    I found a fix for the bug at line 213 in navigation.php that solves this and simply wanted to share it.

    The modified code is:

    
    	if ( in_array( $args->theme_location, apply_filters( 'generate_menu_arrow_theme_locations', $theme_locations ) ) ) {
    		if(null != $item->classes) {
    			foreach ( $item->classes as $value ) {
    				if ( 'menu-item-has-children' === $value  ) {
    					$title = $title . '<span role="button" class="dropdown-menu-toggle" aria-expanded="false"></span>';
    				}
    			}
    		}
    	}
    

    The original code was:

    
    	if ( in_array( $args->theme_location, apply_filters( 'generate_menu_arrow_theme_locations', $theme_locations ) ) ) {
    		foreach ( $item->classes as $value ) {
    			if ( 'menu-item-has-children' === $value  ) {
    				$title = $title . '<span role="button" class="dropdown-menu-toggle" aria-expanded="false"></span>';
    			}
    		}
    	}
    

    Just thought that this might be useful for others too.

    // Göran

    #302619
    Tom
    Lead Developer
    Lead Developer

    What was the original error you were getting?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.