Making WordPress.org


Ignore:
Timestamp:
05/01/2024 01:23:04 AM (11 months ago)
Author:
dd32
Message:

Plugin Directory: Review: Suffix ZIP urls with the API through .zip#wporgapi:https://.... rather than through .zip?info=https...

This will improve the experience for reviewers, as otherwise ? needs to be escaped on the command line.

See #7385.

File:
1 edited

Legend:

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

    r13610 r13636  
    18531853        }
    18541854
    1855         $url = add_query_arg(
    1856             'info',
    1857             urlencode( rest_url( sprintf(
    1858                 'plugins/v1/pending-plugin/%d-%s/',
    1859                 $post->ID,
    1860                 $token
    1861             ) ) ),
    1862             $url
    1863         );
     1855        // Append with a anchor, such that CLI environments don't require special handling.
     1856        $url .= '#wporgapi:' . rest_url( sprintf(
     1857            'plugins/v1/pending-plugin/%d-%s/',
     1858            $post->ID,
     1859            $token
     1860        ) );
    18641861
    18651862        return $url;
Note: See TracChangeset for help on using the changeset viewer.