XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 4, 2009, 7:45:54 AM (16 years ago)
Author:
toemon
Message:

#89 xpress_pings_list()でワーニングの修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/custom_functions.php

    r150 r154  
    377377         
    378378        $trackbacks = xpress_get_pings(); 
    379         $output = '<ol id="xpress_pingslist"> '; 
    380  
    381         foreach ($trackbacks as $trackback){ 
    382                 $list = date(get_settings('date_format'),$trackback['date']) . ' <a target="_blank" href="' . $trackback['site_url'] . '" rel="external nofollow">' . sprintf(__('From %1$s on site %2$s','xpressme'),$trackback['title'],$trackback['site_name']) . "</a>\n" ; 
    383  
    384                 $output .=  '<li>'; 
    385                 $output .=  $list ; 
    386                 $output .=  '</li>'; 
    387  
    388         } 
    389         $output .= '</ol>' ; 
     379        if (! empty($trackbacks)) { 
     380                $output = '<ol id="xpress_pingslist"> '; 
     381 
     382                foreach ($trackbacks as $trackback){ 
     383                        $list = date(get_settings('date_format'),$trackback['date']) . ' <a target="_blank" href="' . $trackback['site_url'] . '" rel="external nofollow">' . sprintf(__('From %1$s on site %2$s','xpressme'),$trackback['title'],$trackback['site_name']) . "</a>\n" ; 
     384 
     385                        $output .=  '<li>'; 
     386                        $output .=  $list ; 
     387                        $output .=  '</li>'; 
     388 
     389                } 
     390                $output .= '</ol>' ; 
     391        } else { 
     392                $output = ''; 
     393        } 
     394         
    390395        if ($show) echo $output; else return $output; 
    391396} 
Note: See TracChangeset for help on using the changeset viewer.