Changeset 8766 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php
- Timestamp:
- 05/09/2019 09:59:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/helper-functions.php
r8758 r8766 289 289 return $count; 290 290 } 291 292 /** 293 * Lists file references for a translation. 294 * 295 * @param \GP_Project $project Current project. 296 * @param object $entry Current translation entry. 297 */ 298 function wporg_references( $project, $entry ) { 299 ?> 300 <ul> 301 <?php 302 foreach ( $entry->references as $reference ) : 303 list( $file, $line ) = array_pad( explode( ':', $reference ), 2, 0 ); 304 if ( $source_url = $project->source_url( $file, $line ) ) : 305 ?> 306 <li><a target="_blank" href="<?php echo $source_url; ?>"><?php echo $file.':'.$line ?></a></li> 307 <?php 308 else : 309 echo "<li>$file:$line</li>"; 310 endif; 311 endforeach; 312 ?> 313 </ul> 314 <?php 315 }
Note: See TracChangeset
for help on using the changeset viewer.