Making WordPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#6381 closed defect (bug) (fixed)

Filter docblock not parsed / doesn't exist on DevHub

Reported by: audrasjb's profile audrasjb Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

It looks like the xmlrpc_element_limit filter doesn't exist on DevHub.
I can't figure out what's wrong with the docblock declaration… or maybe it's just because of the conditional?

That's annoying, because there is a link (via a @see mention) to this filter in the following DevHub link: https://developer.wordpress.org/reference/hooks/xmlrpc_enabled/

If this filter can't be parsed because of the conditional, should we simply address the issue by removing the @see mention from the xmlrpc_enabled function DocBlock?

Source:
https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/IXR/class-IXR-message.php#L86

Change History (4)

#1 in reply to: ↑ description ; follow-up: @SergeyBiryukov
2 years ago

Replying to audrasjb:

It looks like the xmlrpc_element_limit filter doesn't exist on DevHub.
I can't figure out what's wrong with the docblock declaration… or maybe it's just because of the conditional?

Thanks for catching this! The same applies to the xmlrpc_chunk_parsing_size filter.

These two are the only filters in the wp-includes/IXR directory. I think the conditional is not relevant here, but the directory is simply excluded from parsing. Looking at the source, that is indeed the case.

If this filter can't be parsed because of the conditional, should we simply address the issue by removing the @see mention from the xmlrpc_enabled function DocBlock?

I think the solution would be to remove the exclusion, so that the directory is parsed too. Apparently it was considered an external library without any filters, but that is not the case, it's an adopted library and does include some hooks.

#2 in reply to: ↑ 1 @dd32
2 years ago

Replying to SergeyBiryukov:

These two are the only filters in the wp-includes/IXR directory. I think the conditional is not relevant here, but the directory is simply excluded from parsing. Looking at the source, that is indeed the case.
...
I think the solution would be to remove the exclusion, so that the directory is parsed too.

I agree, if we've adopted it, and it doesn't have it's own code reference / we've modified it enough, we might as well just include it in our code reference.

#3 @SergeyBiryukov
2 years ago

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

In 11944:

Developer, Parser: Remove wp-includes/IXR/ from the list of exclusions for parsing.

This is a library adopted by WordPress core, which includes some WP filters:

  • xmlrpc_element_limit
  • xmlrpc_chunk_parsing_size

These should be documented in Code Reference.

Follow-up to [WP29404], [WP30744], [WP35095], [7715].

Props audrasjb, dd32, SergeyBiryukov.
Fixes #6381.

#4 @SergeyBiryukov
2 years ago

  • Keywords 2nd-opinion removed

I have re-run the parser after [11944], and the documentation for both filters is available now:

Note: See TracTickets for help on using tickets.