Making WordPress.org

Ticket #2677: 2677.1.diff

File 2677.1.diff, 1.5 KB (added by Ipstenu, 7 years ago)

Corrected patch

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

     
    3838
    3939                add_filter( 'wp_comment_reply', function( $string ) use ( $post ) {
    4040                        $author = get_user_by( 'id', $post->post_author );
     41                       
     42                        $type   = 'Notice';
     43                        if ( $post->post_status == 'draft' || $post->post_status == 'pending' ) {
     44                                $type = 'Request';
     45                        }
     46                       
    4147                        ?>
    4248                        <form id="contact-author" class="contact-author" method="POST" action="https://supportpress.wordpress.org/plugins/thread-new.php">
    4349                                <input type="hidden" name="to_email" value="<?php echo esc_attr( $author->user_email ); ?>" />
    4450                                <input type="hidden" name="to_name" value="<?php echo esc_attr( $author->display_name ); ?>" />
    45                                 <input type="hidden" name="subject" value="<?php printf( esc_attr__( '[WordPress Plugin Directory] Request: %s', 'wporg-plugins' ), $post->post_title ); ?>" />
     51                                <input type="hidden" name="subject" value="<?php printf( esc_attr__( '[WordPress Plugin Directory] %s: %s', 'wporg-plugins' ), $notice, $post->post_title ); ?>" />
    4652                                <button class="button button-primary" type="submit"><?php _e( 'Contact plugin author', 'wporg-plugins' ); ?></button>
    4753                        </form>
    4854                        <?php