WordPress / WordPress/phpdoc-parser
Add ability to remove previously parsed resources no longer getting parsed
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 239
- Forks
- 81
- Avg merge
- 16h 29m
- Merged PRs (30d)
- 8
Description
It'd be nice to optionally be able to remove previously parsed resources that were not included as part of a full re-parsing.
Remove may mean delete, but more likely assignment of a non-"publish" post status.
Two examples where this is useful:
- Inadvertently (or intentionally, but with later misgivings about doing so) including a file in a parsing that should not have been included. (In this case you may actually want the parsed resources deleted.)
- Functions, hooks, classes, etc that no longer exist and that you no longer want to have listed/available as if they did. (In this case you probably don't want to delete as there may be meta data added to these resources after they were parsed, such as comments, etc.)
This could be a wontfix under the belief that it's the parser user's responsibility to handle this. In which case, the parser user would probably hook 'wp_parser_import_item_post_data' and forcibly set post_modified for everything sent its way (since currently, wp_update_post() is not called if there wasn't a change in the post object data). Then after parsing, a script could remove anything not modified since the known parsing datetime (and anything related to them).
But shouldn't the parser have some responsibility (or capability) here if it does updates?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the parser's full re-parsing flow and the wp_parser_import_item_post_data hook, including when wp_update_post() is called. Review how parsed resources are identified and determine whether the intended behavior is deletion, assigning a non-"publish" status, or leaving cleanup to a script; the issue does not yet establish a chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100