Reply To: URLs are not being displayed properly in custom menu

#20346
simoami
Participant

Here’s my fix:

In themes/enlightenment/core/functions/navigation.php (line 29), replace the following block:


$nav_menu = str_replace(
                $args->container_class . '"',
                $args->container_class . '"' . enlightenment_extra_atts( $atts ),
                $nav_menu
        );

with:


$nav_menu = preg_replace('/(class=\"[^"]*)/i', '\1"' . enlightenment_extra_atts( $atts ), $nav_menu);

The final function should look like this:


function enlightenment_nav_menu_container_extra_atts( $nav_menu, $args ) {
        $atts = apply_filters( 'enlightenment_nav_menu_container_extra_atts', ' role="navigation"' );

        $nav_menu = preg_replace('/(class=\"[^"]*)/i', '\1"' . enlightenment_extra_atts( $atts ), $nav_menu);
        
        return $nav_menu;
}

Voila!