WordPress.org

Plugin Directory

Changeset 609998


Ignore:
Timestamp:
10/09/12 12:41:56 (5 years ago)
Author:
janrenz
Message:

+added title attr

Location:
web-screenshots/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • web-screenshots/trunk/index.php

    r608586 r609998  
    4242                'link'    => TRUE, 
    4343                'refresh' => TRUE, 
     44                'title' => '' 
    4445             
    4546                 
     
    6465        $imgUrl = $this->apiUrl . urlencode($url) .'?w='. $width; 
    6566        $output = ''; 
     67        if ($title == ''){ 
     68            // 
     69            $title = $url; 
     70        } 
    6671        if ($link == true) 
    6772        { 
    68             $output .= '<a href="'. $url .'" title="'. $url .'" class="webscreenshot_link" '; 
     73            $output .= '<a href="'. $url .'" title="'. $title .'" class="webscreenshot_link" '; 
    6974            if ($newpage == true) 
    7075            { 
     
    7378            $output .= ' >'; 
    7479        } 
    75         $output .= '<img class="'.implode (' ', $cssclasses).'" data-refreshcounter="0" data-width="'.$width.'" data-src="'.$imgUrl.'" src="'.$imgUrl.'" width="'.$width.'"/>'; 
     80        $output .= '<img alt="'.$alttext.'" class="'.implode (' ', $cssclasses).'" data-refreshcounter="0" data-width="'.$width.'" data-src="'.$imgUrl.'" src="'.$imgUrl.'" width="'.$width.'"/>'; 
    7681        if ($link == true) 
    7782        { 
  • web-screenshots/trunk/readme.txt

    r608592 r609998  
    2424newpage: open link in new page (optional, default: true)  
    2525 
     26title: set link title tag (will be used as img alt tag also) (optional, default:'') 
    2627 
    2728All img-tags generated will have a class called "webscreenshot", the link will have a class called "webscreenshot-link" which you can you to perform additional style stuff 
     
    3435 
    3536== Changelog == 
     37= 1.2 = 
     38* added attribute to set link title tag (will be used as alt tag for the img as well) 
    3639 
    3740= 1.1 = 
Note: See TracChangeset for help on using the changeset viewer.