PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.9
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.9
1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 0.8.8 0.8.7 0.8.6 All 33 releases
desktop-mode / includes / framework / app / contracts / interface-hooks.php

interface-hooks.php in OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin 1.1.9, at includes/framework/app/contracts/interface-hooks.php

41 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OpenStation App Framework — Hooks contract.
4 *
5 * The extensibility bus. Apps expose their seams through it exactly
6 * as WordPress code does — `filter()` to let others reshape a value,
7 * `action()` to announce that something happened — and the host
8 * decides what those calls mean.
9 *
10 * @package OpenStation
11 */
12
13 namespace OpenStation\App\Contracts;
14
15 // Direct access, unless a standalone host is booting on bare PHP.
16 if ( ! defined( 'ABSPATH' ) ) {
17 defined( 'OPENSTATION_STANDALONE' ) || exit;
18 }
19
20 interface Hooks {
21
22 /**
23 * Run a value through every registered filter callback.
24 *
25 * @param string $hook Hook name.
26 * @param mixed $value Value to filter.
27 * @param mixed ...$args Extra arguments handed to the callbacks.
28 * @return mixed Filtered value.
29 */
30 public function filter( $hook, $value, ...$args );
31
32 /**
33 * Fire an action.
34 *
35 * @param string $hook Hook name.
36 * @param mixed ...$args Arguments handed to the callbacks.
37 * @return void
38 */
39 public function action( $hook, ...$args );
40 }
41