• Resolved Emilian Robert Vicol

    (@byrev)


    in file class.yith-wcan-navigation-widget.php, I change this:

     if ( $label ) {
    
                                echo '<li ' . $class . '>';
    
                                echo ( $count > 0 || $option_is_set ) ? '<a ' . $rel_nofollow . ' title="' . $term->name . '" href="' . $link . '">' : '<span>';
    
                                echo $label;
    
                                echo ( $count > 0 || $option_is_set ) ? '</a>' : '</span>';
                            }

    with this:

    if (!$label) { $label = $term->name; }
    
     if ( $label ) {
    
                                echo '<li ' . $class . '>';
    
                                echo ( $count > 0 || $option_is_set ) ? '<a ' . $rel_nofollow . ' title="' . $term->name . '" href="' . $link . '">' : '<span>';
    
                                echo $label;
    
                                echo ( $count > 0 || $option_is_set ) ? '</a>' : '</span>';
                            }

    and in file functions.yith-wcan.php, I change this:
    $return .= "<tr><td><label for='{$id}{$term->term_id}'>{$term->name}</label></td><td><input type='text' id='{$id}{$term->term_id}' name='{$name}[labels][{$term->term_id}]' value='" . ( isset( $values[$term->term_id] ) ? $values[$term->term_id] : '' ) . "' size='3' /></td></tr>";

    with this:
    $return .= "<tr><td><label for='{$id}{$term->term_id}'>{$term->name}</label></td><td><input type='text' id='{$id}{$term->term_id}' name='{$name}[labels][{$term->term_id}]' value='" . ( !empty( $values[$term->term_id] ) ? $values[$term->term_id] : $term->name ) . "' size='3' /></td></tr>";

    and this will solve the problem with Type = Label if labels is empty !

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi there,
    thank you for your reporting.
    We’ll integrate it in the next official release of the plugin ??
    Thank you.

    Thread Starter Emilian Robert Vicol

    (@byrev)

    Thanks, I will watch when an update appears!

    Plugin Author YITHEMES

    (@yithemes)

    Hi there,

    we think to release a new version very soon

    YITH

    • This reply was modified 5 years ago by YITHEMES.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘FallBack if missing label from settings’ is closed to new replies.