Making WordPress.org

Opened 18 months ago

Last modified 18 months ago

#6670 new defect (bug)

Developer references for `activate_plugin` and `activate_{$plugin}` are missing

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

Two actions in core are missing from the search results in the developer reference.

Searching for activate_plugin returns no results: https://developer.wordpress.org/?s=activate_plugin&post_type%5B%5D=wp-parser-hook

However, navigating directly to https://developer.wordpress.org/reference/hooks/activate_plugin/ shows documentation for the activate_{$plugin} action does actually exist.

I suspect there may be an issue with these two hooks having the same resulting slug, but that's just a hunch.

Change History (1)

#1 @dd32
18 months ago

I suspect there may be an issue with these two hooks having the same resulting slug, but that's just a hunch.

I suspect your suspicion is correct, as hooks are present in multiple places and there's no validation on the post_title being the same.
I'm not personally sure how this case should be handled, I guess activate_plugin-2 is the WordPress way..

This also affects deactivate_plugin and deactivate_{$plugin}

Code in question:
https://github.com/WordPress/phpdoc-parser/blob/7ae98fca7bc280f16c427905dc038160f02f6c0e/lib/class-importer.php#L588-L626

Would it be possible for you to file this in the above repo?

Note: See TracTickets for help on using tickets.