Making WordPress.org


Ignore:
Timestamp:
05/23/2014 05:58:19 AM (12 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-reference.php

    r591 r639  
    2626        <?php
    2727        $source_file = get_source_file();
    28         if ( ! empty( $source_file ) ) : ?>
    29         <section class="source">
    30                 <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>
    31         </section>
     28        if ( ! empty( $source_file ) ) :
     29                ?>
     30                <section class="source">
     31                        <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>
     32                        <p><a href="<?php echo get_source_file_link(); ?>"><?php _e( 'View source&hellip;', 'wporg' ); ?></a></p>
     33                </section>
    3234        <?php endif; ?>
    3335
Note: See TracChangeset for help on using the changeset viewer.