Making WordPress.org


Ignore:
Timestamp:
05/23/2014 05:58:19 AM (11 years ago)
Author:
coffee2code
Message:

Code Reference: Add link to core.trac to view code source for item. Fixes #447. props DrewAPicture

  • Change 'Source:' label to 'Source file:'
  • Add 'View source...' link that points to relevant line in core.trac when appropriate
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/content-wp-parser-hook.php

    r561 r639  
    44
    55    <h1><a href="<?php the_permalink() ?>"><?php echo get_signature(); ?></a></h1>
    6 
    76    <section class="description">
    87        <?php the_excerpt(); ?>
     
    2524    <?php
    2625    $source_file = get_source_file();
    27     if ( ! empty( $source_file ) ) : ?>
    28     <section class="source">
    29         <p><strong><?php _e( 'Source:', 'wporg' ); ?></strong> <a href="<?php echo get_source_file_link( $source_file ); ?>"><?php echo esc_html( $source_file ); ?></a></p>
    30     </section>
     26    if ( ! empty( $source_file ) ) :
     27        ?>
     28        <section class="source">
     29            <p><strong><?php _e( 'Source file:', 'wporg' ); ?> </strong><a href="<?php echo get_source_file_archive_link( $source_file ); ?>"><?php echo esc_html( $source_file ); ?></a></p>
     30            <p><a href="<?php echo get_source_file_link(); ?>"><?php _e( 'View source&hellip;', 'wporg' ); ?></a></p>
     31        </section>
    3132    <?php endif; ?>
    3233
Note: See TracChangeset for help on using the changeset viewer.