Adjusted hook events for a simpler interface and wrapped in a provider.

This commit is contained in:
Andrey Savchenko committed 2018-02-13 17:26:41 +02:00
1 parent 06e3bb4657
commit c74051e87d
13 files changed
+223 -234

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
<?php
namespace Rarst\Laps\Event;
/**
* Events for Theme Hook Alliance
*
* @link http://zamoose.github.io/themehookalliance/
*/
class THA_Events implements Hook_Event_Config_Interface {
/**
* @return array
*/
public function get_events() {
$events = [];
if ( ! defined( 'THA_HOOKS_VERSION' ) ) {
return $events;
}
$events['tha_header_before'][10] = [
'event' => 'Header',
'category' => 'theme',
];
$events['tha_header_after'][10] = [
'action' => 'stop',
'event' => 'Header',
'category' => 'theme',
];
$events['tha_sidebars_before'][10] = [
'event' => 'Sidebars',
'category' => 'theme',
];
$events['tha_sidebars_after'][10] = [
'action' => 'stop',
'event' => 'Sidebars',
'category' => 'theme',
];
return $events;
}
}