Making WordPress.org

Changeset 2978


Ignore:
Timestamp:
04/19/2016 07:57:19 PM (9 years ago)
Author:
obenland
Message:

Plugins Directory: Always show link to zip file if available.

Restricting it to only pending does not reflect the review flow anymore.

See #1570.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php

    r2655 r2978  
    99class Review_Tools {
    1010    static function display() {
    11         $post = get_post();
    12         $plugin_slug = $post->post_name;
     11        $post      = get_post();
     12        $zip_files = get_attached_media( 'application/zip', $post );
    1313
    14         $zip_files = get_attached_media( 'application/zip', $post );
    15         if ( $zip_files && 'pending' == $post->post_status ) {
     14        if ( $zip_files ) {
    1615            $zip_file = current( $zip_files );
    17             $zip_url = wp_get_attachment_url( $zip_file->ID );
    18             printf(
    19                 '<p>' . __( '<strong>Zip file:</strong> %s', 'wporg-plugins' ) . '</p>',
    20                 sprintf(
    21                     '<a href="%s">%s</a>',
    22                     esc_url( $zip_url ),
    23                     esc_html( $zip_url )
    24                 )
     16            $zip_url  = wp_get_attachment_url( $zip_file->ID );
     17            printf( '<p>' . __( '<strong>Zip file:</strong> %s', 'wporg-plugins' ) . '</p>',
     18                sprintf( '<a href="%s">%s</a>', esc_url( $zip_url ), esc_html( $zip_url ) )
    2519            );
    2620        }
    2721
    2822        echo "<ul>
    29             <li><a href='https://plugins.trac.wordpress.org/log/{$plugin_slug}/'>" . __( 'Development Log', 'wporg-plugins' ) . "</a></li>
    30             <li><a href='https://plugins.svn.wordpress.org/{$plugin_slug}/'>" . __( 'Subversion Repository', 'wporg-plugins' ) . "</a></li>
    31             <li><a href='https://plugins.trac.wordpress.org/browser/{$plugin_slug}/'>" . __( 'Browse in Trac', 'wporg-plugins' ) . '</a></li>
     23            <li><a href='https://plugins.trac.wordpress.org/log/{$post->post_name}/'>" . __( 'Development Log', 'wporg-plugins' ) . "</a></li>
     24            <li><a href='https://plugins.svn.wordpress.org/{$post->post_name}/'>" . __( 'Subversion Repository', 'wporg-plugins' ) . "</a></li>
     25            <li><a href='https://plugins.trac.wordpress.org/browser/{$post->post_name}/'>" . __( 'Browse in Trac', 'wporg-plugins' ) . '</a></li>
    3226        </ul>';
    3327
Note: See TracChangeset for help on using the changeset viewer.