Making WordPress.org

Changeset 13655


Ignore:
Timestamp:
05/02/2024 08:13:54 AM (2 years ago)
Author:
dd32
Message:

Helpscout: Plugins: Limit the API endpoint to the plugins inbox.

See [13651].
See #7385.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/helpscout/plugins-themes.php

    r13651 r13655  
    141141
    142142function display_items( $post_ids ) {
     143        global $request;
     144
    143145        echo '<ul>';
    144146        foreach ( $post_ids as $post_id ) {
     
    173175
    174176                        // Append Info URL.
    175                         if ( $download_url && class_exists( '\WordPressdotorg\Plugin_Directory\API\Routes\Plugin_Review' ) ) {
     177                        if (
     178                                $download_url &&
     179                                str_starts_with( $request->mailbox->email ?? '' , 'plugins' ) &&
     180                                class_exists( '\WordPressdotorg\Plugin_Directory\API\Routes\Plugin_Review' )
     181                        ) {
    176182                                $download_url = \WordPressdotorg\Plugin_Directory\API\Routes\Plugin_Review::append_plugin_review_info_url( $download_url, $post );
    177183                        }
Note: See TracChangeset for help on using the changeset viewer.