Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#40839 closed defect (bug) (fixed)

Incorrect and incomplete inline docs for wp_check_browser_version()

Reported by: coffee2code Owned by: SergeyBiryukov
Priority: normal Milestone: 4.8
Component: Administration Version:
Severity: trivial Keywords: has-patch
Cc: Focuses: docs

Description

The inline docs for wp_check_browser_version() in wp-admin/includes/dashboard.php incorrectly states that the response array from the BrowseHappy API will include the upgrade_url key. In reality, the name for the key is update_url. (The correct key name is used in the actual code.)

See ​https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php#L83

Additionally, the API may return a platform key and value, which isn't mentioned in the inline docs.

The attached patch corrects the misnamed response key and adds docs for the missing key.

Attachments (1)

40839.diff​ (1.0 KB ) - added by coffee2code 9 years ago.
Patch to correct misnamed key and add docs for omitted key

Download all attachments as: .zip

Change History (3)

@coffee2code
9 years ago

Patch to correct misnamed key and add docs for omitted key

#1 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 40822:

Administration: Update the docs for wp_check_browser_version().

Correct update_url key name, add missing platform key.

Props coffee2code.
Fixes #40839.

#2 @SergeyBiryukov
9 years ago

  • Component General → Administration
  • Milestone Awaiting Review → 4.8
Note: See TracTickets for help on using tickets.