CoreFiles by mySites.guru
HookManager.php33 lines, 709 bytes, from wordpress-6.7.zip
Raw History Compare with 6.6.11
md5
3ba89520847dd48b1e81a5fef89d0133
sha1
5920c3c9e286945ff7b501d3af95d0a7034182e1
sha256
4b09da68b4f523dd9d36f047117e0c1fd442c6aebc8e4cc3632e5ac1a04ff317
<?php
/**
 * Event dispatcher
 *
 * @package Requests\EventDispatcher
 */

namespace WpOrg\Requests;

/**
 * Event dispatcher
 *
 * @package Requests\EventDispatcher
 */
interface HookManager {
	/**
	 * Register a callback for a hook
	 *
	 * @param string $hook Hook name
	 * @param callable $callback Function/method to call on event
	 * @param int $priority Priority number. <0 is executed earlier, >0 is executed later
	 */
	public function register($hook, $callback, $priority = 0);

	/**
	 * Dispatch a message
	 *
	 * @param string $hook Hook name
	 * @param array $parameters Parameters to pass to callbacks
	 * @return boolean Successfulness
	 */
	public function dispatch($hook, $parameters = []);
}

The same content is in 229 releases, WordPress 6.2-beta1 to 7.2-beta5. See them all, or every version of this file.