Making WordPress.org

Changeset 9229


Ignore:
Timestamp:
10/24/2019 04:57:53 AM (4 years ago)
Author:
dd32
Message:

Main Theme: Don't link to releases that don't exist.

Fixes #4772.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/template-tags.php

    r8622 r9229  
    3838            <small>(<a href="<?php echo esc_url( $release['zip_url'] . '.md5' ); ?>">md5</a> | <a href="<?php echo esc_url( $release['zip_url'] . '.sha1' ); ?>">sha1</a>)</small>
    3939        </td>
    40         <td><a href="<?php echo esc_url( $release['targz_url'] ); ?>">tar.gz</a><br>
    41             <small>(<a href="<?php echo esc_url( $release['targz_url'] . '.md5' ); ?>">md5</a> | <a href="<?php echo esc_url( $release['targz_url'] . '.sha1' ); ?>">sha1</a>)</small>
     40        <td>
     41            <?php if ( $release['targz_url'] ) : ?>
     42                <a href="<?php echo esc_url( $release['targz_url'] ); ?>">tar.gz</a><br>
     43                <small>(<a href="<?php echo esc_url( $release['targz_url'] . '.md5' ); ?>">md5</a> | <a href="<?php echo esc_url( $release['targz_url'] . '.sha1' ); ?>">sha1</a>)</small>
     44            <?php endif; ?>
    4245        </td>
    4346        <?php if ( ! defined( 'IS_ROSETTA_NETWORK' ) || ! IS_ROSETTA_NETWORK ) : ?>
Note: See TracChangeset for help on using the changeset viewer.