Code Monkey home page Code Monkey logo

wp-hookdoc's Issues

Parsing fails when referencing namespaced parameters

When referencing namespaced objects, instead of generating a row for the parameter, the table has an empty row:

I tried a bunch of things but I'm afraid none work:

  • {\\GV\\Template_Context}
  • {\GV\Template_Context}
  • {%5GV%5Template_Context}

Then these work, but they show the quotes, which I don't want:

  • {'\GV\Template_Context'}
  • {"\GV\Template_Context"}

Here's an example docblock:

/**
 * Modify the reserved embed slugs that trigger a warning.
 *
 * @hook gravityview/rewrite/reserved_slugs
 * @since 2.5
 *
 * @param {array} $reserved_slugs An array of strings, reserved slugs.
 * @param {\GV\Template_Context} $gravityview The context.
 *
 * @returns {array}
 */

I understand that you're simulating @class by replacing @hook with @class and that JS doesn't have that PHP namespace notation, but I'd appreciate guidance!

No parameters are visible in documentation

The @param tag is ignored partial. If a parameter is provided it is only visible in the apply_filter('', $...) arguments list but there is no parameters table with param description and type.

Consider using WordPress PHP Coding Standards

I noticed that in the screenshot included in the README, the do_action example generated by

<h4 class="name" id="<?js= id ?>"><?js= (data.returns ? 'apply_filters' : 'do_action') +
has no space between the parentheses and the single quotes that follow/precede them. It would be great to make sure WordPress PHP Coding Standards are incorporated into this tool so that any later copy/pasting from the generated docs will start someone off on the right foot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.