Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #211536

    We are seeing code in the “title” tag of the icon link. I think someone else reported this already Icon Box Title link but I don’t think the answer was correct. It is not a plug-in conflict, it is an issue in the code.

    iconbox.php lines 165-169 look like this:

    case 'both':
                                $title = "<a href='$link' title='".esc_attr($title)."' $blank>$title</a>";
                                $display_char_wrapper['start'] = "a href='{$link}' title='".esc_attr($title)."' {$blank}";
                                $display_char_wrapper['end'] = 'a';
                                break;

    As you can see the $title variable in 166 gets assigned the string and then you use that same variable in the “title” tag again in line 167. You are expecting to grab the value passed to the function but you are actually getting the reassigned value of $title. And that is what we are seeing.

    I simple modified the code to look like this:

    case 'both':
                                $mytitlecopy = $title;
                                $title = "<a href='$link' title='".esc_attr($title)."' $blank>$title</a>";
                                $display_char_wrapper['start'] = "a href='{$link}' title='".esc_attr($mytitlecopy)."' {$blank}";
                                $display_char_wrapper['end'] = 'a';
                                break;

    I’m not sure that’s the best way to fix it but it worked for me. BTW, great work on the template it.

    #211687

    Hey caesss!

    Thank you for the heads up. Appreciated! Anyway, the markup has been changed on latest version of Enfold.

    $link = aviaHelper::get_url($link);
                    if(!empty($link))
                    {
                        $title = "<a href='$link' title='".esc_attr($title)."' $blank>$title</a>";
                    }

    Regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Icon Box Title link bug I think.’ is closed to new replies.