slimndap / wp-theatre

A free plugin to publish your events on a WordPress website. Perfect for theaters, music venues, cinemas and festivals.
https://wp.theater
GNU General Public License v3.0
40 stars 23 forks source link

Documentation #325

Open carstingaxion opened 11 months ago

carstingaxion commented 11 months ago

What to do, when there is no fmtr?

😁 Made me laugh some days ago.


Which standards to follow for inline comments and how do we generate the documentation (uses and developers)?

So, for sure, this plugin needs proper documentation for end-users and developers as well.

Because I would expect us to stay a small group of contributors, without a big budget for doing nice things over here, we should stay focused. That said, I think we should not start writing long essays, adding screenshots and so on, at least not now.

Instead we should focus on good, understandable inline code comments, well formatted to be parseable by any phpdoc library. Automated tests against the WordPress-Docs coding-standard should help writing those comments accordingly.

For the beginning, we should concentrate on action- and filter-hooks, over misc. functions and classes.

I added some code documentation to an un-documented, but existing filter and did some testing with wp-hookdoc, which is, for example, used for the Distributor dev-docs by 10up and looked nice to me.

Unfortunately, this was not possible, due to: https://github.com/10up/actions-wordpress/issues/42

The supposed alternative was this:

https://github.com/wp-hooks/generator

It seems like (from a quick view) it generates the hooks list from PHP and JS, both types of files, this one appears to be a better choice. It creates a JSON representation of the actions and filters used by WordPress in the code. It is compatible with WordPress core, themes, and plugins. Additionally offers code for using the PHP or JS files' generated hook files.

Let's give it a try!