Making WordPress.org

Changeset 13179


Ignore:
Timestamp:
02/07/2024 02:54:55 AM (9 months ago)
Author:
tellyworth
Message:

Plugin Directory: Add Plugin Check buttons on author pending page.

See #7405.

File:
1 edited

Legend:

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

    r13116 r13179  
    11<?php
    22namespace WordPressdotorg\Plugin_Directory\Shortcodes;
     3use WordPressdotorg\Plugin_Directory\Template;
    34
    45class Upload {
     
    195196                    </p>
    196197
     198                    <p>
     199                        <?php _e( 'Please review the Plugin Check results for your plugin, and fix any significant problems. This will help streamline the preview process and reduce delays by ensuring your plugin already meets the required standards when the plugin review team examines it.' ); ?>
     200                    </p>
     201
    197202                    <ul>
    198203                    <?php
     
    280285
    281286                            echo '<strong>' . __( 'Submitted files:', 'wporg' ) . '</strong><ol>';
    282                             foreach ( $attached_media as $upload ) {
     287                            foreach ( $attached_media as $attachment_post_id => $upload ) {
    283288                                echo '<li><ul>';
    284289                                echo '<li><code>' . esc_html( $upload->submitted_name ) . '</code></li>';
    285290                                echo '<li>' . sprintf( __( 'Version: %s', 'wporg-plugins' ), '<code>' . esc_html( $upload->version ) . '</code>' ) . '</li>';
    286291                                echo '<li>' . sprintf( __( 'Upload Date: %s', 'wporg-plugins' ), date_i18n( get_option( 'date_format' ), strtotime( $upload->post_date ) ) ) . '</li>';
     292                                printf(
     293                                    '<li><a href="%s" class="%s" target="_blank">%s</a></li>',
     294                                    esc_url( Template::preview_link_zip( $plugin->post_name, $upload->ID, 'pcp' ) ),
     295                                    ( array_key_first( $attached_media) === $attachment_post_id ? 'button button-primary' : 'button button-secondary' ),
     296                                    __( 'Check with Plugin Check', 'wporg-plugins' )
     297                                );
    287298                                echo '</ul></li>';
    288299                            }
Note: See TracChangeset for help on using the changeset viewer.