WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#40839 closed defect (bug) (fixed)

Incorrect and incomplete inline docs for wp_check_browser_version()

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

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 5 months ago.
Patch to correct misnamed key and add docs for omitted key

Download all attachments as: .zip

Change History (3)

@coffee2code
5 months ago

Patch to correct misnamed key and add docs for omitted key

#1 @SergeyBiryukov
5 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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
5 months ago

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