WordPress.org

Ready to get started?Download WordPress

Ideas

Custom phpdoc tags for inline documentation.

  1. Michael Fields
    Themer

    12345

    This is an idea that I came up with while developing a soon-to-be-released plugin. Not sure if it really makes sense, so I wanted to post it here to see what others thought.

    For the past year or so, WordPress core has included inline documentation using phpdoc style syntax. I find this documentation to be very useful and am really happy that it was added. There are about 1,700 hooks (calls to do_action(), apply_filter(), etc...) that go unnoticed when parsed through phpdoc or phpxref. I think that it may be beneficial to developers if there was a way to tag the core code in a way where "automatic documenting scripts" could index functions by the hooks that they use. Kind of like @uses but instead, @action or @filter.

    What do you think?

    Posted: 4 years ago #
  2. Daryl Koopersmith
    WordPress Dev

    Great idea Michael. In fact, we're planning on improving the API reference in the upcoming 3.org cycle (the plan is to devote two months to improving wordpress.org), and I'd love to see this implemented in some capacity.

    For more details, see this post, this comment, and this thread.

    Posted: 4 years ago #
  3. Michael Fields
    Themer

    12345

    koopersmith, Awesoeme thanks! And thanks for posting the links. I'll have to jump in on some documentation when I'm done with my plugin!

    Posted: 4 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    7 Votes
  • Status

    Good idea! We're working on it