Inventory_Presser_WPForms::add_hooks()
Adds hooks and registers a field type that power our WPForms integration.
Return Return
(void)
Source Source
File: includes/integrations/class-wpforms.php
public function add_hooks() { add_filter( 'wpforms_smart_tags', array( $this, 'smart_tags_register' ), 10, 1 ); add_filter( 'wpforms_smart_tag_process', array( $this, 'smart_tags_process' ), 10, 2 ); // No hook because this add_hooks() method is called at plugins_loaded hook. if ( ! class_exists( 'WPForms_Field' ) || ! empty( $this->field_instance ) ) { return; } include_once plugin_dir_path( INVP_PLUGIN_FILE_PATH ) . 'includes/integrations/class-wpforms-field-vehicle.php'; $this->field_instance = new WPForms_Field_Vehicle(); // Add our field type to the list of allowed fields in wpforms_get_form_fields(). add_filter( 'wpforms_get_form_fields_allowed', array( $this, 'add_field_types' ) ); }
Expand full source codeCollapse full source codeView on Github