DefinedFieldTypes
1 month ago
EditProfile
4 years ago
Login
5 years ago
PasswordReset
5 years ago
UserProfile
5 years ago
Bio.php
5 years ago
CFPassword.php
5 years ago
CheckboxList.php
5 years ago
ConfirmEmail.php
5 years ago
ConfirmPassword.php
2 years ago
Country.php
5 years ago
CoverImage.php
4 years ago
Date.php
5 years ago
DisplayName.php
5 years ago
Email.php
5 years ago
FirstName.php
5 years ago
HTML.php
5 years ago
Init.php
5 years ago
LastName.php
5 years ago
Nickname.php
5 years ago
Number.php
5 years ago
Password.php
5 years ago
PasswordStrengthMeter.php
5 years ago
ProfilePicture.php
5 years ago
RadioButtons.php
5 years ago
SelectDropdown.php
5 years ago
SelectRole.php
2 months ago
SingleCheckbox.php
5 years ago
TextBox.php
1 month ago
Textarea.php
5 years ago
Username.php
5 years ago
Website.php
5 years ago
Init.php
88 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePress\Core\Admin\SettingsPages\DragDropBuilder\Fields; |
| 4 | |
| 5 | use ProfilePress\Core\Classes\ExtensionManager as EM; |
| 6 | use ProfilePress\Core\Classes\FormRepository as FR; |
| 7 | |
| 8 | class Init |
| 9 | { |
| 10 | public static function init() |
| 11 | { |
| 12 | $form_type = sanitize_text_field($_GET['form-type']); |
| 13 | |
| 14 | do_action('ppress_drag_drop_builder_field_init_before', $form_type); |
| 15 | |
| 16 | if (in_array($form_type, [FR::EDIT_PROFILE_TYPE, FR::REGISTRATION_TYPE])) { |
| 17 | new Username(); |
| 18 | new Email(); |
| 19 | new ConfirmEmail(); |
| 20 | new Password(); |
| 21 | new ConfirmPassword(); |
| 22 | new PasswordStrengthMeter(); |
| 23 | new Website(); |
| 24 | new Nickname(); |
| 25 | new DisplayName(); |
| 26 | new FirstName(); |
| 27 | new LastName(); |
| 28 | new ProfilePicture(); |
| 29 | new CoverImage(); |
| 30 | new Bio(); |
| 31 | new TextBox(); |
| 32 | new Textarea(); |
| 33 | new SelectDropdown(); |
| 34 | new CheckboxList(); |
| 35 | new RadioButtons(); |
| 36 | new SingleCheckbox(); |
| 37 | new CFPassword(); |
| 38 | new Number(); |
| 39 | new Country(); |
| 40 | new Date(); |
| 41 | new DefinedFieldTypes\Agreeable(); |
| 42 | new DefinedFieldTypes\Checkbox(); |
| 43 | new DefinedFieldTypes\Input(); |
| 44 | new DefinedFieldTypes\Password(); |
| 45 | new DefinedFieldTypes\Date(); |
| 46 | new DefinedFieldTypes\Radio(); |
| 47 | new DefinedFieldTypes\Select(); |
| 48 | } |
| 49 | |
| 50 | if ($form_type == FR::EDIT_PROFILE_TYPE) { |
| 51 | new EditProfile\ShowProfilePicture(); |
| 52 | new EditProfile\ShowCoverImage(); |
| 53 | } |
| 54 | |
| 55 | if ($form_type == FR::REGISTRATION_TYPE) { |
| 56 | new SelectRole(); |
| 57 | } |
| 58 | |
| 59 | if ($form_type == FR::LOGIN_TYPE) { |
| 60 | new Login\Userlogin(); |
| 61 | new Login\Password(); |
| 62 | new Login\RememberLogin(); |
| 63 | } |
| 64 | |
| 65 | if ($form_type == FR::PASSWORD_RESET_TYPE) { |
| 66 | new PasswordReset\Userlogin(); |
| 67 | } |
| 68 | |
| 69 | if (in_array($form_type, [FR::USER_PROFILE_TYPE, FR::MEMBERS_DIRECTORY_TYPE])) { |
| 70 | new UserProfile\Username(); |
| 71 | new UserProfile\Email(); |
| 72 | new UserProfile\FirstName(); |
| 73 | new UserProfile\LastName(); |
| 74 | new UserProfile\Website(); |
| 75 | new UserProfile\DisplayName(); |
| 76 | new UserProfile\Nickname(); |
| 77 | new UserProfile\Bio(); |
| 78 | |
| 79 | if (EM::is_enabled(EM::CUSTOM_FIELDS)) { |
| 80 | new UserProfile\CustomField(); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | new HTML(); |
| 85 | |
| 86 | do_action('ppress_drag_drop_builder_field_init_after', $form_type); |
| 87 | } |
| 88 | } |