Viewing 1 replies (of 1 total)
  • Thread Starter Contortion

    (@contortion)

    Just to let you know, I altered your code a little and got rid of the errors : ` public function widget($args,$instance){
    extract($args);
    extract($instance);
    $title = apply_filters(‘widget_title’,$title);
    echo ‘<div style=”padding-left:40px”>’.$before_title . $title . $after_title;
    echo ‘<ul class=”links_with_icons”>’;
    for($i=0;$i<$numB;$i++)
    {
    $count=$i+1;
    $target = ‘iT’.$count;
    $link = ‘iLink’.$count;
    $name = ‘iName’.$count;
    $icon = ‘iIcon’.$count;
    $nofollow = ‘iFollow’.$count;

    if(empty($$name)) return false;

    //Determining Whether To Open In New Window Or Not
    if($$target == 1)
    {
    $tar = ‘target=”_blank” ‘;
    }
    else
    {
    $tar = ”;
    }

    //Determining If Link IS No Follow
    if($$nofollow == 1)
    {
    $fol = ‘rel=”nofollow” ‘;
    }
    else
    {
    $fol = ”;
    }

    //Parse URL for proper output in HTTP or HTTPS environment
    $imgurl = parse_url($$icon);
    $imgsrc=$imgurl[“host”].$imgurl[“path”];

    echo ‘<li class=”link_with_icon”><img src=”//’.$imgsrc.'” alt=””><a ‘.$fol.$tar.’href=”‘.esc_attr($$link).'”>’.esc_attr($$name).'</a></li>’;
    }
    echo ‘</ul></div>’;

    }`

    Something to do with $beforewidget and $afterwidget was causing the problem

Viewing 1 replies (of 1 total)
  • The topic ‘W3C validator problems’ is closed to new replies.