resources
4 years ago
AddonsAdminPage.php
4 years ago
AddonsRepository.php
4 years ago
HideSaleBannerRoute.php
4 years ago
RecurringDonationsTab.php
4 years ago
SaleBanners.php
4 years ago
ServiceProvider.php
4 years ago
ServiceProvider.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\InPluginUpsells; |
| 4 | |
| 5 | use Give\Helpers\Hooks; |
| 6 | use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface; |
| 7 | |
| 8 | /** |
| 9 | * @since 2.17.0 |
| 10 | */ |
| 11 | class ServiceProvider implements ServiceProviderInterface |
| 12 | { |
| 13 | |
| 14 | public function register() |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | public function boot() |
| 19 | { |
| 20 | Hooks::addAction('admin_menu', AddonsAdminPage::class, 'register'); |
| 21 | Hooks::addAction('rest_api_init', HideSaleBannerRoute::class, 'registerRoute'); |
| 22 | |
| 23 | if (AddonsAdminPage::isShowing()) { |
| 24 | Hooks::addAction('admin_enqueue_scripts', AddonsAdminPage::class, 'loadScripts'); |
| 25 | } |
| 26 | |
| 27 | if (RecurringDonationsTab::isShowing()) { |
| 28 | Hooks::addAction('admin_enqueue_scripts', RecurringDonationsTab::class, 'loadScripts'); |
| 29 | } |
| 30 | |
| 31 | if (SaleBanners::isShowing()) { |
| 32 | Hooks::addAction('admin_notices', SaleBanners::class, 'render'); |
| 33 | Hooks::addAction('admin_enqueue_scripts', SaleBanners::class, 'loadScripts'); |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 |