Provider
Class Provider
Source
File: src/Events/Admin/Notice/Provider.php
class Provider extends Service_Provider {
/**
* Register implementations.
*
* @since
*/
public function register() {
$this->container->singleton( Rest_Api::class, Rest_Api::class );
$this->add_actions();
$this->add_filters();
}
/**
* Add the action hooks.
*
* @since
*/
public function add_actions() {
add_action( 'admin_init', $this->container->callback( Rest_Api::class, 'hook' ) );
}
/**
* Add the filter hooks.
*
* @since
*/
public function add_filters() {
}
}
Methods
- add_actions — Add the action hooks.
- add_filters — Add the filter hooks.
- register — Register implementations.