Helpers
11 months ago
Integrations
1 week ago
RestApi
2 weeks ago
abilities
2 weeks ago
abstracts
2 weeks ago
admin
2 weeks ago
blocks
1 year ago
elementor
2 years ago
export
2 months ago
fields
2 weeks ago
interfaces
8 years ago
libraries
2 years ago
log-handlers
1 year ago
shortcodes
2 weeks ago
stats
5 months ago
templates
3 months ago
traits
2 weeks ago
class-everest-forms.php
1 week ago
class-evf-addon-upsell.php
2 weeks ago
class-evf-ajax.php
2 weeks ago
class-evf-autoloader.php
7 years ago
class-evf-background-process-import-entries.php
1 year ago
class-evf-background-updater.php
7 years ago
class-evf-cache-helper.php
2 months ago
class-evf-cron.php
2 years ago
class-evf-deprecated-action-hooks.php
6 years ago
class-evf-deprecated-filter-hooks.php
5 years ago
class-evf-email-entries-report.php
3 months ago
class-evf-emails.php
2 weeks ago
class-evf-fields.php
2 weeks ago
class-evf-form-handler.php
2 weeks ago
class-evf-form-task.php
2 weeks ago
class-evf-forms-features.php
2 weeks ago
class-evf-frontend-scripts.php
2 weeks ago
class-evf-install.php
2 months ago
class-evf-integrations.php
3 months ago
class-evf-log-levels.php
8 years ago
class-evf-logger.php
5 years ago
class-evf-post-types.php
1 year ago
class-evf-privacy.php
6 years ago
class-evf-report-cron.php
2 months ago
class-evf-reporting.php
2 months ago
class-evf-session-handler.php
7 years ago
class-evf-shortcodes.php
1 year ago
class-evf-smart-tags.php
9 months ago
class-evf-template-loader.php
1 year ago
class-evf-validation.php
6 years ago
evf-conditional-functions.php
6 years ago
evf-core-functions.php
2 weeks ago
evf-deprecated-functions.php
6 years ago
evf-entry-functions.php
4 months ago
evf-formatting-functions.php
4 years ago
evf-notice-functions.php
4 years ago
evf-template-functions.php
4 years ago
evf-template-hooks.php
7 years ago
evf-update-functions.php
5 years ago
class-evf-forms-features.php
89 lines
| 1 | <?php |
| 2 | /** |
| 3 | * EverestForms features |
| 4 | * |
| 5 | * @package EverestForms\Admin |
| 6 | * @since 1.2.0 |
| 7 | */ |
| 8 | |
| 9 | defined( 'ABSPATH' ) || exit; |
| 10 | |
| 11 | /** |
| 12 | * Features Class. |
| 13 | */ |
| 14 | class EVF_Forms_Features { |
| 15 | |
| 16 | /** |
| 17 | * Constructor. |
| 18 | */ |
| 19 | public function __construct() { |
| 20 | add_filter( 'everest_forms_fields', array( $this, 'form_fields' ) ); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Load additional fields available in the Pro version. |
| 25 | * |
| 26 | * @param array $fields Registered form fields. |
| 27 | * @return array |
| 28 | */ |
| 29 | public function form_fields( $fields ) { |
| 30 | $pro_fields = array( |
| 31 | 'EVF_Field_Image_Upload', |
| 32 | 'EVF_Field_Hidden', |
| 33 | 'EVF_Field_Phone', |
| 34 | 'EVF_Field_Password', |
| 35 | 'EVF_Field_HTML', |
| 36 | 'EVF_Field_Divider', |
| 37 | 'EVF_Field_Title', |
| 38 | 'EVF_Field_Signature', |
| 39 | 'EVF_Field_Address', |
| 40 | 'EVF_Field_Country', |
| 41 | 'EVF_Field_Range_Slider', |
| 42 | 'EVF_Field_Privacy_Policy', |
| 43 | 'EVF_Field_Captcha', |
| 44 | 'EVF_Field_Repeater', |
| 45 | 'EVF_Field_Wysiwyg', |
| 46 | 'EVF_Field_Progress', |
| 47 | 'EVF_Field_Payment_Single', |
| 48 | 'EVF_Field_Payment_Radio', |
| 49 | 'EVF_Field_Payment_Checkbox', |
| 50 | 'EVF_Field_Payment_Quantity', |
| 51 | 'EVF_Field_Payment_Total', |
| 52 | 'EVF_Field_Payment_Subtotal', |
| 53 | 'EVF_Field_Payment_Subscription_Plan', |
| 54 | 'EVF_Field_Credit_Card', |
| 55 | 'EVF_Field_Payment_Gateway_Selector', |
| 56 | 'EVF_Field_Payment_Coupon', |
| 57 | 'EVF_Field_Payment_Authorize_Net', |
| 58 | 'EVF_Field_Rating', |
| 59 | 'EVF_Field_Likert', |
| 60 | 'EVF_Field_Scale_Rating', |
| 61 | 'EVF_Field_Yes_No', |
| 62 | 'EVF_Field_Color', |
| 63 | 'EVF_Field_Reset', |
| 64 | 'EVF_Field_Lookup', |
| 65 | |
| 66 | ); |
| 67 | |
| 68 | if ( class_exists( 'EVF_Field_Payment_Summary' ) ) { |
| 69 | $pro_fields[] = 'EVF_Field_Payment_Summary'; |
| 70 | } |
| 71 | |
| 72 | $enabled_features = get_option( 'everest_forms_enabled_features', array() ); |
| 73 | |
| 74 | $feature_map = array( |
| 75 | 'everest-forms-square' => 'EVF_Field_Payment_Square', |
| 76 | ); |
| 77 | |
| 78 | foreach ( $feature_map as $feature => $class ) { |
| 79 | if ( in_array( $feature, $enabled_features, true ) ) { |
| 80 | $pro_fields[] = $class; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | return array_merge( $fields, $pro_fields ); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | new EVF_Forms_Features(); |
| 89 |