Opened 21 months ago
Last modified 21 months ago
#6670 new defect (bug)
Developer references for `activate_plugin` and `activate_{$plugin}` are missing
Reported by: | 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.
activate_plugin
: https://github.com/WordPress/wordpress-develop/blob/4f813e3817baec2be73fe372a278c3dca2fb97a9/src/wp-admin/includes/plugin.php#L676activate_{$plugin}
: https://github.com/WordPress/wordpress-develop/blob/4f813e3817baec2be73fe372a278c3dca2fb97a9/src/wp-admin/includes/plugin.php#L691
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.
Note: See
TracTickets for help on using
tickets.
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
anddeactivate_{$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?