1. Go to this page and download the library: Download micropackage/dochooks library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
micropackage / dochooks example snippets
class Example extends HookAnnotations {
/**
* @action test
*/
public function test_action() {}
/**
* @filter test 5
*/
public function test_filter( $val, $arg ) {
return $val;
}
/**
* @shortcode test
*/
public function test_shortcode( $atts, $content ) {
return 'This is test';
}
}
$example = new Example();
$example->add_hooks();
use Micropackage\DocHooks\Helper;
(bool) Helper::is_enabled();
use Micropackage\DocHooks\HookAnnotations;
class Example extends HookAnnotations {
/**
* @action test
*/
public function test_action() {}
}
$example = new Example();
$example->add_hooks();
use Micropackage\DocHooks\HookTrait;
class Example {
use HookTrait;
/**
* @action test
*/
public function test_action() {}
}
$example = new Example();
$example->add_hooks();
use Micropackage\DocHooks\Helper;
class Example {
/**
* @action test
*/
public function test_action() {}
}
$example = Helper::hook( new Example() );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.