WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 9 months ago

#45997 closed defect (bug) (fixed)

Revert @ignore of _get_term_hierarchy()

Reported by: coffee2code Owned by: boonebgorges
Milestone: 5.2 Priority: normal
Severity: trivial Version: 4.3
Component: Taxonomy Keywords: has-patch
Focuses: docs Cc:
PR Number:

Description

In [32453], the @ignore dockblock tag was added to _get_term_hierarchy() as part of a general docs cleanup for that file. Prior to that commit, the function was marked @access private, so it was regularly getting parsed into the Code Reference. As of that commit, the parser was directed to ignore parsing the function. The parser doesn't handle changes of state like this, so the docs for _get_term_hierarchy() have remained in an unchanged state since then. That is, the docs page for the function--as it was prior to the state change--is still available on the Code Ref, but no longer getting updated due to the @ignore directive. (Or it would be if not for the manual override to "fix" this.)

Yes, this sounds like a problem with the parser for the Code Reference, and it is. However, in this particular case, it turns out that marking the function to be ignored was done in error.

In a related discussion on the matter in #meta2600, @DrewAPicture (the committer of [32453]) acknowledges that the change from @access private to @ignore was done in error (or rather, during a brief period when handling for this was still in flux) and that this particular change should get reverted.

Attached is a patch that makes _get_term_hierarchy() private instead of ignored once again.

Attachments (1)

45997.diff (377 bytes) - added by coffee2code 10 months ago.
Patch mentioned in ticket.

Download all attachments as: .zip

Change History (3)

@coffee2code
10 months ago

Patch mentioned in ticket.

#1 @swissspidy
10 months ago

  • Milestone changed from Awaiting Review to 5.2

#2 @boonebgorges
9 months ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 44755:

Taxonomy: Remove @ignore annotation on _get_term_hierarchy().

Originally introduced in [32453], the @ignore annotation caused the
function to be improperly ignored by the Code Reference parser.

The @access private annotation is the correct way to mark a
function for internal use only.

Props coffee2code.
Fixes #45997.

Note: See TracTickets for help on using tickets.