WordPress.org

Making WordPress.org

Changeset 5267


Ignore:
Timestamp:
04/06/2017 07:33:29 AM (4 years ago)
Author:
tellyworth
Message:

Plugin directory admin: improve email subject when contacting a plugin author. Props @ipstenu.

Fixes #2677

File:
1 edited

Legend:

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

    r5182 r5267  
    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' ), $type, $post->post_title ); ?>" />
    4652                <button class="button button-primary" type="submit"><?php _e( 'Contact plugin author', 'wporg-plugins' ); ?></button>
    4753            </form>
Note: See TracChangeset for help on using the changeset viewer.