Making WordPress.org


Ignore:
Timestamp:
08/10/2020 02:32:39 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: Link the Version in wp-admin to the Trac ticket related to that version.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/admin-edit.php

    r5572 r10134  
    403403
    404404    foreach ( $versions as $version => $status ) :
     405        $text = esc_html( $version );
     406        if ( $ticket = get_post_meta( $post->ID, sanitize_key( '_trac_ticket_' . $version ), true ) ) {
     407            $text = '<a href="https://themes.trac.wordpress.org/ticket/' . (int)$ticket . '">' . $text . '</a>';
     408        }
    405409        ?>
    406         <p><?php echo $version; ?> -
     410        <p><?php echo $text; ?> -
    407411            <select name="wporg_themes_status[<?php echo base64_encode( $version ); // base64 because version numbers don't work so well as parts of keys ?>]">
    408412                <option value="new" <?php selected( $status, 'new' ); ?>><?php esc_html_e( 'New', 'wporg-themes' ); ?></option>
Note: See TracChangeset for help on using the changeset viewer.