Download the PHP package akirk/extract-wp-hooks without Composer

On this page you can find all versions of the php package akirk/extract-wp-hooks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package extract-wp-hooks

extract-hooks

This script is intended for WordPress plugins that provide hooks that can be used by other plugins. By parsing its source code, it creates a documentation in a Github wiki.

Typically, you'd first create a extract-wp-hooks.json, and check out the Github wiki in a folder above the repo. Modify the extract-wp-hooks.json accordingly and execute extract-wp-hooks.php. This will create markdown files in the wiki folder. You can then git commit and git push the changes.

Examples

How it works

The PHP script doesn't have any dependencies. It uses PHP's internal parser (using token_get_all) to identify PHP function calls to apply_filters() or do_action().

It generates a markdown file for each filter which is suitable for a Github wiki. The page contains potentially provided documentation (via a comment in the source code), an (auto-generated) example, parameters, return value, references to the source code (including extracted source snippet).

Example: Provide Documentation Via a Comment

For each filter, it looks at the comment preceeding the filter, so that you can document it, for example:

This will generate an example_filter1.md that contains the text This is an example filter and a list of parameters and return value:

example_filter1

This is an example filter.

Parameters

  • string $text The text to modify.
  • string $mode Extra information that might be useful.

Returns

string The modified text.

But not only that, it will contain an auto-generated example:

Auto-generated Example

Provide an Example

You can also provide your own example in the comment, that will override the auto-generated example:

php

It generates this output: example_filter2

Example

No Documentation

Finally, if you have an filter without any documentation, the script attempts to create a useful auto-generated example. So suppose you have code

It generates this output: example_filter3

Auto-generated Example

Parameters

  • $text
  • $mode

Install

Via composer:

You will then be able to run extract-wp-hooks.php from the vendor bin directory:

Place a .extract-wp-hooks.json or extract-wp-hooks.json in your project directory to use it.


All versions of extract-wp-hooks with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package akirk/extract-wp-hooks contains the following files

Loading the files please wait ....