[wp-trac] [WordPress Trac] #56221: Add download URL to plugins REST endpoint

WordPress Trac noreply at wordpress.org
Thu Jul 14 21:51:39 UTC 2022


#56221: Add download URL to plugins REST endpoint
--------------------------------------+-----------------------------
 Reporter:  brianhenryie              |      Owner:  (none)
     Type:  enhancement               |     Status:  new
 Priority:  normal                    |  Milestone:  Awaiting Review
Component:  Plugins                   |    Version:
 Severity:  minor                     |   Keywords:
  Focuses:  administration, rest-api  |
--------------------------------------+-----------------------------
 The `wp-json/wp/v2/plugins` endpoint allows installing plugins by POSTING
 the `slug` parameter. It then queries the .org plugin repo for the
 download link and proceeds to download and install that zip file using
 `Plugin_Upgrader`.

 I would like to be able to specify the download URL so I can install
 plugins from outside the .org plugin repo.

 My plan is to install plugins to my site when a I create a new release on
 GitHub, i.e. use GitHub Actions to POST the new download URL to my site,
 then serve the plugin to other sites using SatisPress.

 I tried unsuccessfully to find past related tickets that maybe discussed
 if omitting this functionality was intentional.

 It looks like a relatively easy change. I'll make PR for it soon.


 https://github.com/WordPress/WordPress/blob/4c265b66297074f09d66c17d9f14d11a5fffdb00
 /wp-includes/rest-api/endpoints/class-wp-rest-plugins-
 controller.php#L289-L313

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56221>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list