1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GeminiLabs\SiteReviews\Addons; |
4
|
|
|
|
5
|
|
|
abstract class Hooks |
6
|
|
|
{ |
7
|
|
|
protected $addon; |
8
|
|
|
protected $basename; |
9
|
|
|
protected $controller; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @return void |
13
|
|
|
*/ |
14
|
|
|
public function run() |
15
|
|
|
{ |
16
|
|
|
add_action('init', [$this->addon, 'update']); |
17
|
|
|
add_action('admin_enqueue_scripts', [$this->controller, 'enqueueAdminAssets']); |
18
|
|
|
add_action('enqueue_block_editor_assets', [$this->controller, 'enqueueBlockAssets']); |
19
|
|
|
add_action('wp_enqueue_scripts', [$this->controller, 'enqueuePublicAssets']); |
20
|
|
|
add_filter('plugin_action_links_'.$this->basename, [$this->controller, 'filterActionLinks']); |
21
|
|
|
add_filter('site-reviews/config', [$this->controller, 'filterConfigPath']); |
22
|
|
|
add_filter('site-reviews/addon/documentation', [$this->controller, 'filterDocumentation']); |
23
|
|
|
add_filter('site-reviews/gettext/site-reviews-images', [$this->controller, 'filterGettext'], 10, 2); |
24
|
|
|
add_filter('site-reviews/gettext_with_context/site-reviews-images', [$this->controller, 'filterGettextWithContext'], 10, 3); |
25
|
|
|
add_filter('site-reviews/ngettext/site-reviews-images', [$this->controller, 'filterNgettext'], 10, 4); |
26
|
|
|
add_filter('site-reviews/ngettext_with_context/site-reviews-images', [$this->controller, 'filterNgettextWithContext'], 10, 5); |
27
|
|
|
add_filter('site-reviews/path', [$this->controller, 'filterFilePaths'], 10, 2); |
28
|
|
|
add_filter('site-reviews/addon/settings', [$this->controller, 'filterSettings']); |
29
|
|
|
add_filter('site-reviews/addon/system-info', [$this->controller, 'filterSystemInfo']); |
30
|
|
|
add_filter('site-reviews/translation/entries', [$this->controller, 'filterTranslationEntries']); |
31
|
|
|
add_filter('site-reviews/translator/domains', [$this->controller, 'filterTranslatorDomains']); |
32
|
|
|
add_action('init', [$this->controller, 'registerBlocks']); |
33
|
|
|
add_action('plugins_loaded', [$this->controller, 'registerLanguages']); |
34
|
|
|
add_action('init', [$this->controller, 'registerShortcodes']); |
35
|
|
|
add_action('init', [$this->controller, 'registerTinymcePopups']); |
36
|
|
|
add_action('widgets_init', [$this->controller, 'registerWidgets']); |
37
|
|
|
add_action('site-reviews/addon/settings/'.$this->addon->slug, [$this->controller, 'renderSettings']); |
38
|
|
|
} |
39
|
|
|
} |
40
|
|
|
|