[wp-trac] [WordPress Trac] #33709: Deprecate wp_get_http()

WordPress Trac noreply at wordpress.org
Thu Sep 3 15:12:52 UTC 2015


#33709: Deprecate wp_get_http()
--------------------------+----------------------------------------
 Reporter:  johnbillion   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  Awaiting Review
Component:  HTTP API      |    Version:  2.5
 Severity:  normal        |   Keywords:  needs-patch good-first-bug
  Focuses:                |
--------------------------+----------------------------------------
 The `wp_get_http()` function isn't used anywhere (apart from itself).

 It's a weird function that accepts a URL and a file path, performs a GET
 request, saves the response to the file, and returns just the response
 headers with the response code bolted on. If you don't specify a file path
 then it just performs a HEAD request. It doesn't accept an arguments array
 like the rest of the HTTP API functions.

 Downloading and saving an external file can be done with `download_url()`
 or with the `filename` argument in any HTTP API request.

 This function was introduced back in the dark ages before we had a good
 HTTP API. Let's deprecate it by moving it to `wp-includes/deprecated.php`
 and adding a `_deprecated_function()` call.

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


More information about the wp-trac mailing list