Making WordPress.org


Ignore:
Timestamp:
02/26/2016 07:49:53 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Don't rely upon the GUID.
Props rmccue.
See #1569

File:
1 edited

Legend:

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

    r2625 r2639  
    4646        $zip_files = get_attached_media( 'application/zip', $post );
    4747        $zip_file  = current( $zip_files );
     48        $zip_url   = wp_get_attachment_url( $zip_file->ID );
    4849
    49         if ( $zip_file ) :
     50        if ( $zip_url ) :
    5051            ?>
    5152
    5253            <p style="padding: 0 10px;">
    53                 <?php printf( __( '<strong>Zip file:</strong> %s' ), sprintf( '<a href="%s">%s</a>', esc_url( $zip_file->guid ), $zip_file->guid ) ); ?>
     54                <?php printf( __( '<strong>Zip file:</strong> %s' ), sprintf( '<a href="%s">%s</a>', esc_url( $zip_url ), esc_html( $zip_url ) ) ); ?>
    5455            </p>
    5556
Note: See TracChangeset for help on using the changeset viewer.