WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#37073 closed enhancement (wontfix)

Remove deprecated argument from wp_get_http_headers

Reported by: borgesbruno Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:
PR Number:

Description

There is a deprecated argument in wp_get_http_headers since the 2.7 WordPress version that isn't used in any place, actually there is only one call for this function in src/wp-includes/functions.php if ( $headers = wp_get_http_headers( $url) ) {, which do not use this argument, so, seems there is no need for this argument, in aditional I've wrote tests to cover this function and improve the coverage.

If there is some utility for this let me know, because the unit tests will be useful

Attachments (1)

37073.diff (1.7 KB) - added by borgesbruno 3 years ago.

Download all attachments as: .zip

Change History (4)

@borgesbruno
3 years ago

#1 @borgesbruno
3 years ago

  • Keywords has-patch has-unit-tests added

#2 @rmccue
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This argument is still on the function for two reasons: a) so that people who were using it get a deprecation warning, and b) so that we don't accidentally introduce a conflicting argument in future changes.

The unit tests might be useful though; can you submit that as a new ticket please?

#3 @borgesbruno
3 years ago

Tks @rmccue, I had asked about that on slack, but nobody has said that for me.
This is the new ticket https://core.trac.wordpress.org/ticket/37090

Version 0, edited 3 years ago by borgesbruno (next)
Note: See TracTickets for help on using tickets.