Making WordPress.org

Ticket #4307: 4307.diff

File 4307.diff, 4.3 KB (added by Ipstenu, 6 years ago)

Helping the Scouts

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

     
    8181                                                urlencode( esc_attr( $author->user_nicename ) ),
    8282                                                esc_attr__( 'Click to search Pluginrepo SupportPress for mentions of this author', 'wporg-plugins' )
    8383                                        ),
     84                                        sprintf(
     85                                                '<a href="https://secure.helpscout.net/search/?query=mailbox:Plugins%20%s" title="%s">HS</a>',
     86                                                urlencode( esc_attr( $author->user_nicename ) ),
     87                                                esc_attr__( 'Click to search HelpScout for mentions of this author', 'wporg-plugins' )
     88                                        ),
    8489                                );
    8590                                vprintf( '<span class="profile-sp-link">[ %s | %s ]</span>', $author_links );
    8691                                ?>
     
    9095                                        <a href="//wordpress.org/support/users/<?php echo $author->user_nicename; ?>"><?php _e( 'support', 'wporg-plugins' ); ?></a>
    9196                                </span>
    9297                                <div class="profile-email">
    93                                         &lt;<?php echo $author->user_email; ?>&gt;
     98                                        &lt;<?php echo esc_attr( $author->user_email ); ?>&gt;
    9499                                        <span class="profile-sp-link">
    95100                                        <?php
    96101                                        printf(
     
    99104                                                esc_attr__( 'Click to search Pluginrepo SupportPress for emails sent to/from this email address', 'wporg-plugins' )
    100105                                        );
    101106                                        ?>
     107                                        &nbsp;
     108                                        <?php
     109                                        printf(
     110                                                '<a href="https://secure.helpscout.net/search/?query=mailbox:Plugins%20%s" title="%s">HS</a>',
     111                                                esc_attr( $author->user_email ),
     112                                                esc_attr__( 'Click to search HelpScout for emails sent to/from this email address', 'wporg-plugins' )
     113                                        );
     114                                        ?>
    102115                                        </span>
    103116                                </div>
    104117                                <div class="profile-join">
     
    282295                                }
    283296                        }
    284297
     298                        $plugin_name = $plugin->post_title;
    285299                        $plugin_slug = $plugin->post_name;
    286300                        if ( in_array( $plugin->post_status, array( 'new', 'pending' ) ) ) {
    287301                                /* translators: %s: time ago */
     
    359373                                ),
    360374                                sprintf(
    361375                                        '<a href="https://supportpress.wordpress.org/plugins/?q=%s&status=&todo=Search+%%C2%%BB" title="%s">SP</a>',
    362                                         urlencode( esc_attr( $plugin_slug ) ),
     376                                        urlencode( esc_attr( $plugin_name ) ),
    363377                                        esc_attr__( 'Click to search Plugin SupportPress for mentions of this plugin', 'wporg-plugins' )
    364378                                ),
     379                                sprintf(
     380                                        '<a href="https://secure.helpscout.net/search/?query=mailbox:Plugins%20%s" title="%s">HS</a>',
     381                                        rawurlencode( esc_attr( $plugin_name ) ),
     382                                        esc_attr__( 'Click to search HelpScout for mentions of this plugin', 'wporg-plugins' )
     383                                ),
    365384                        ] );
    366385
    367386                        if ( $extra ) {
  • trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php

     
    258258                                $subject = sprintf( __( '[WordPress Plugin Directory] Notice: %s', 'wporg-plugins' ), $post->post_title );
    259259                        }
    260260
     261                        // HelpScout requires urlencode() becuase it wants spaces as + signs.
     262                        $contact_author = 'https://secure.helpscout.net/mailbox/ad3e85554c5bd064/new-ticket/?name=' . $author->display_name . '&email=' . $author->user_email . '&cc=' . $cc_emails . '&subject=' . urlencode( $subject );
    261263                        ?>
    262                         <form id="contact-author" class="contact-author" method="POST" action="https://supportpress.wordpress.org/plugins/thread-new.php">
    263                                 <input type="hidden" name="to_email" value="<?php echo esc_attr( $author->user_email ); ?>"/>
    264                                 <input type="hidden" name="to_name" value="<?php echo esc_attr( $author->display_name ); ?>"/>
    265                                 <input type="hidden" name="cc" value="<?php echo esc_attr( $cc_emails ); ?>"/>
    266                                 <input type="hidden" name="subject" value="<?php echo esc_attr( $subject ); ?>"/>
    267                                 <button class="button button-primary" type="submit">Contact plugin author</button>
    268                         </form>
     264                        <a id="contact-author" class="button button-primary" href="<?php esc_url( $contact_author ); ?>">Contact plugin committer(s)</a>
    269265                        <?php
    270266
    271267                        return $string;