Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1855 closed enhancement (fixed)

List classes that extend the current class on the Code Reference

Reported by: grapplerulrich's profile grapplerulrich Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:


Migrated from an issue filed on the phpdoc-parser repo on GitHub:

List child classes as "Used by" in the parent class

I was interested which classes extend the Walker class.

Change History (4)

#1 @DrewAPicture
8 years ago

Interesting idea. This would be a great feature to implement on the Code Reference. The nice thing is that the parser already stores the parent classes in meta during parsing ('extends'), so it would be a simple query to retrieve that list. And with the auto-linking of known classes, we wouldn't even have to handle that part, just get the list and output it.

Related: #1847, #174

This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.

8 years ago

#3 @coffee2code
8 years ago

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

In 3809: For wp-parser-class, list parent class under 'Uses' and list extending classes under 'Used By'.

  • Change post_type_has_uses_info() and post_type_has_usage_info() to return true for 'wp-parser-class' post type.
  • In template-related.php, check that $uses has a value before using it.
  • In get_uses() and get_used_by()`, find classes related via the custom field '_wp-parser_extends', which notes the class being extended.

Fixes #1855.

Note: See TracTickets for help on using tickets.