WordPress.org

Make WordPress Core

#48913 closed enhancement (fixed)

Update documentation for the get_categories page

Reported by: dingo_d Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version: 5.4
Component: Taxonomy Keywords: has-patch 2nd-opinion
Focuses: docs Cc:

Description

Currently, the docblock for https://developer.wordpress.org/reference/functions/get_categories/ page says

If you change the type to ‘link’ in the arguments, then the link categories will be returned instead. Also all categories will be updated to be backward compatible with pre-2.3 plugins and themes.

The type argument has been deprecated so it shouldn't really be suggested since it will throw a notice in development if used.

I'll attach a patch with the proposed change.

Attachments (1)

48913.diff (1.1 KB) - added by dingo_d 13 months ago.
A patched with updated docblock

Download all attachments as: .zip

Change History (3)

@dingo_d
13 months ago

A patched with updated docblock

#1 @SergeyBiryukov
13 months ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#2 @SergeyBiryukov
13 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 46891:

Docs: Update description for get_categories() to avoid suggesting the deprecated type argument.

Follow-up to [13754].

Props dingo_d.
Fixes #48913.

Note: See TracTickets for help on using tickets.