display-conditions
5 months ago
front
1 month ago
helpers
1 month ago
metas
3 months ago
multisite
5 months ago
palettes
3 years ago
provider
1 month ago
providers
1 month ago
templates
3 years ago
update
5 months ago
class-hustle-admin-page-abstract.php
1 month ago
class-hustle-auth-token.php
5 months ago
class-hustle-condition-factory.php
6 years ago
class-hustle-cross-sell.php
9 months ago
class-hustle-dashboard-admin.php
1 month ago
class-hustle-data.php
1 month ago
class-hustle-db.php
2 years ago
class-hustle-installer.php
4 years ago
class-hustle-meta.php
3 years ago
class-hustle-module-admin.php
1 month ago
class-hustle-module-collection.php
5 months ago
class-hustle-module-fields.php
3 months ago
class-hustle-module-page-abstract.php
1 month ago
class-hustle-module-validator.php
3 months ago
class-hustle-notifications.php
1 month ago
class-hustle-settings-admin.php
1 month ago
class-hustle-wp-dashboard-page.php
5 months ago
class-opt-in.php
1 month ago
hustle-background-conversion-log.php
3 months ago
hustle-deletion.php
3 months ago
hustle-embedded-admin.php
3 years ago
hustle-entries-admin.php
5 months ago
hustle-entry-model.php
1 month ago
hustle-general-data-protection.php
5 months ago
hustle-init.php
1 month ago
hustle-mail.php
5 months ago
hustle-migration.php
5 months ago
hustle-model.php
1 month ago
hustle-module-model.php
1 month ago
hustle-module-widget-legacy.php
5 months ago
hustle-module-widget.php
5 months ago
hustle-modules-common-admin-ajax.php
1 month ago
hustle-popup-admin.php
3 years ago
hustle-providers-admin.php
1 month ago
hustle-providers.php
5 months ago
hustle-settings-admin-ajax.php
1 month ago
hustle-settings-page.php
3 years ago
hustle-slidein-admin.php
3 years ago
hustle-sshare-admin.php
3 years ago
hustle-sshare-model.php
1 month ago
hustle-tracking-model.php
3 months ago
interface-hustle-auth-provider.php
5 months ago
opt-in-geo.php
5 months ago
opt-in-utils.php
1 month ago
opt-in-wpmudev-api.php
5 months ago
hustle-init.php
80 lines
| 1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
| 2 | /** |
| 3 | * File for the Hustle_Init class. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since unknown |
| 7 | */ |
| 8 | |
| 9 | if ( ! class_exists( 'Hustle_Init' ) ) { |
| 10 | |
| 11 | /** |
| 12 | * Class Hustle_Init |
| 13 | */ |
| 14 | class Hustle_Init { |
| 15 | |
| 16 | /** |
| 17 | * Hustle_Init constructor |
| 18 | */ |
| 19 | public function __construct() { |
| 20 | |
| 21 | Hustle_Db::maybe_create_tables(); |
| 22 | |
| 23 | new Hustle_Installer(); |
| 24 | |
| 25 | // Hustle Migration. |
| 26 | new Hustle_Migration(); |
| 27 | |
| 28 | // Admin. |
| 29 | if ( is_admin() ) { |
| 30 | |
| 31 | if ( is_multisite() ) { |
| 32 | // Add multisite class. |
| 33 | new Hustle_Multisite(); |
| 34 | } |
| 35 | |
| 36 | new Hustle_Module_Admin(); |
| 37 | |
| 38 | new Hustle_Dashboard_Admin(); |
| 39 | |
| 40 | new Hustle_Popup_Admin(); |
| 41 | |
| 42 | new Hustle_Slidein_Admin(); |
| 43 | |
| 44 | new Hustle_Embedded_Admin(); |
| 45 | |
| 46 | new Hustle_SShare_Admin(); |
| 47 | |
| 48 | // Global Integrations page. |
| 49 | new Hustle_Providers_Admin(); |
| 50 | |
| 51 | new Hustle_Entries_Admin(); |
| 52 | |
| 53 | new Hustle_Settings_Page(); |
| 54 | } |
| 55 | |
| 56 | if ( is_admin() || wp_doing_cron() ) { |
| 57 | new Hustle_General_Data_Protection(); |
| 58 | Hustle_Background_Conversion_Log::get_instance()->init(); |
| 59 | } |
| 60 | |
| 61 | // Front. |
| 62 | new Hustle_Module_Front(); |
| 63 | |
| 64 | // Ajax files. |
| 65 | if ( wp_doing_ajax() ) { |
| 66 | |
| 67 | // Common actions along the modules on admin side. |
| 68 | new Hustle_Modules_Common_Admin_Ajax(); |
| 69 | |
| 70 | // Actions for the global settings page. |
| 71 | new Hustle_Settings_Admin_Ajax(); |
| 72 | |
| 73 | // Actions for frontend. |
| 74 | new Hustle_Module_Front_Ajax(); |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | } |
| 80 |