RegisterWidgetEditorScripts.php
10 months ago
RegisterWidgets.php
10 months ago
SetupElementorCampaignTemplate.php
10 months ago
UnregisterV1Widgets.php
10 months ago
UnregisterV1Widgets.php
49 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\ThirdPartySupport\Elementor\Actions; |
| 4 | |
| 5 | use Give\ThirdPartySupport\Elementor\Widgets\V1\DonationHistoryWidget; |
| 6 | use Give\ThirdPartySupport\Elementor\Widgets\V1\DonationReceiptWidget; |
| 7 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveDonorWallWidget; |
| 8 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveFormGridWidget; |
| 9 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveFormWidget; |
| 10 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveGoalWidget; |
| 11 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveLoginWidget; |
| 12 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveMultiFormGoalWidget; |
| 13 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveProfileEditorWidget; |
| 14 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveRegisterWidget; |
| 15 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveSubscriptionsWidget; |
| 16 | use Give\ThirdPartySupport\Elementor\Widgets\V1\GiveTotalsWidget; |
| 17 | |
| 18 | /** |
| 19 | * @since 4.7.0 |
| 20 | */ |
| 21 | class UnregisterV1Widgets |
| 22 | { |
| 23 | /** |
| 24 | * @since 4.7.0 |
| 25 | */ |
| 26 | public function __invoke($widgets_manager) |
| 27 | { |
| 28 | $v1Widgets = [ |
| 29 | DonationHistoryWidget::class, |
| 30 | DonationReceiptWidget::class, |
| 31 | GiveDonorWallWidget::class, |
| 32 | GiveFormGridWidget::class, |
| 33 | GiveFormWidget::class, |
| 34 | GiveGoalWidget::class, |
| 35 | GiveLoginWidget::class, |
| 36 | GiveMultiFormGoalWidget::class, |
| 37 | GiveProfileEditorWidget::class, |
| 38 | GiveRegisterWidget::class, |
| 39 | GiveSubscriptionsWidget::class, |
| 40 | GiveTotalsWidget::class, |
| 41 | ]; |
| 42 | |
| 43 | foreach ($v1Widgets as $widgetClass) { |
| 44 | $widget = new $widgetClass(); |
| 45 | $widgets_manager->unregister($widget->get_name()); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 |