Giter Site home page Giter Site logo

pronamic / wp-documentor Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 11.0 1.44 MB

Documentation Generator for WordPress.

Home Page: https://pronamic.github.io/wp-documentor/

License: GNU General Public License v2.0

PHP 100.00%
wordpress documentation filters hooks actions phpdocumentor phpdoc php docblock docblocks

wp-documentor's Introduction

Pronamic WordPress Documentor

Pronamic WordPress Documentor

Pronamic WordPress Documentor is a tool to automatically extract data about the actions and filters of your WordPress theme or plugin.

Latest Stable Version Total Downloads Latest Unstable Version License

Table of contents

Getting Started

Installation

To start documenting your WordPress filters and actions, require Pronamic WordPress Documentor in Composer:

composer require pronamic/wp-documentor --dev

First Run

To let Pronamic WordPress Documentor analyse your codebase, you have to use the parse command and point it to the right directory:

vendor/bin/wp-documentor parse src

Command Line Usage

--format=FORMAT

The format in which you want to export the hooks.

Format Description
default Symfony console table.
hookster Hookster JSON.
markdown Markdown.
phpdocumentor-rst RestructuredText for phpDocumentor.

Example: --format=markdown

--template=FILE

Custom PHP template, see for examples the templates folder.

Example: --template=templates/markdown.php

--type=TYPE

Specify whether you want to export actions or filters.

Example: --type=actions or --type=filters

--output=FILE

Write output to file.

Example: --output=docs/hooks.md

--memory-limit=VALUE

Specifies the memory limit in the same format php.ini accepts.

Example: --memory-limit=-1

--exclude=GLOB

Exclude the specified folders/files.

Example: --exclude=vendor --exclude=wordpress

--ignore-vcs-ignored

If the search directory contains a .gitignore file, you can reuse those rules to exclude files and directories from the results with this option.

Example: --ignore-vcs-ignored

--prefix=PREFIX

Only parse hooks starting with the specified prefixes.

Example: --prefix=my_theme --prefix=my_plugin

Examples

vendor/bin/wp-documentor parse ./tests/source
vendor/bin/wp-documentor parse ./tests/source --format=hookster --type=actions --output=tests/docs/hookster-actions.json
vendor/bin/wp-documentor parse ./tests/source --format=hookster --type=filters --output=tests/docs/hookster-filters.json
vendor/bin/wp-documentor parse ./tests/source --format=markdown --output=tests/docs/hooks.md
vendor/bin/wp-documentor parse ./tests/source --format=phpdocumentor-rst --type=actions --output=tests/docs/phpdocumentor-actions.rst
vendor/bin/wp-documentor parse ./tests/source --format=phpdocumentor-rst --type=filters --output=tests/docs/phpdocumentor-filters.rst

Ouput Examples

Alternatives

Here is a list of alternatives that we found. However, none of these satisfied our requirements.

If you know other similar projects, feel free to edit this section!

Inspiration from https://github.com/TypistTech/imposter-plugin#alternatives

Links

Pronamic - Work with us

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.