'wiaas_order_fields', 'text' => $this->get_form_editor_field_title(), ); } public function get_form_editor_field_title() { return esc_attr__( 'Bundle Document', 'wiaas' ); } public function get_download_url( $file, $force_download = false ) { $upload_root = GFFormsModel::get_upload_url( $this->formId ); $upload_root = trailingslashit( $upload_root ); // handle download for order documents not uploaded by gravity forms if ( strpos( $file, $upload_root ) === false ) { return admin_url() . '?gf-wiaas-order-doc=' . urlencode($file); } return parent::get_download_url( $file, $force_download ); } public function sanitize_settings() { parent::sanitize_settings(); $this->wiaasDocTypeFilter = sanitize_key($this->wiaasDocTypeFilter); } } GF_Fields::register( new Wiaas_Field_Order_Bundle_Document() );