Making WordPress.org


Ignore:
Timestamp:
08/08/2023 05:38:53 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Release Confirmation: Don't display a version in the 'Previous Versions' download form if the version was never confirmed.

Fixes #5902.

File:
1 edited

Legend:

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

    r12813 r12816  
    370370        echo '<select class="previous-versions" onchange="getElementById(\'download-previous-link\').href=this.value;">';
    371371        foreach ( $tags as $version ) {
    372                 $text = ( 'trunk' === $version ? __( 'Development Version', 'wporg-plugins' ) : $version );
    373                 printf( '<option value="%s">%s</option>', esc_attr( Template::download_link( $post, $version ) ), esc_html( $text ) );
     372                // Check the tag against the confirmed releases.
     373                $release = Plugin_Directory::get_release( $post, $version );
     374                if ( $release && ! $release['zips_built'] ) {
     375                        continue;
     376                }
     377
     378                $text = $version;
     379                if ( 'trunk' === $version ) {
     380                        $text = __( 'Development Version', 'wporg-plugins' );
     381                }
     382
     383                printf(
     384                        '<option value="%s">%s</option>',
     385                        esc_attr( Template::download_link( $post, $version ) ),
     386                        esc_html( $text )
     387                );
    374388        }
    375389        echo '</select> ';
Note: See TracChangeset for help on using the changeset viewer.