Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 573 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 573 Bytes

Acorn Hook

A package for Acorn or Sage 10 based projects that wraps WordPress Hook API.

Installation

Install via composer:

composer require tobono/acorn-hook

Usage

Example

//...
    use Tobono\Hook\Facades\Action;
    use Tobono\Hook\Facades\Filter;
    
    // do_action, do_action_ref_array
    Action::dispatch('orderPlaced', $order);
    
    // apply_filters, apply_filters_ref_array
    $postTitle = Filter::dispatch('the_title', $postTitle, $postId);

//...