From 4bf8242652cb73b2dfdefc46c5141e0ad479ebfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Fri, 24 Mar 2023 16:24:05 +0100 Subject: [PATCH] Set field icons. --- src/IssuersField.php | 12 ++++++++++++ src/PaymentMethodsField.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/src/IssuersField.php b/src/IssuersField.php index d47b8fd..a5a7097 100644 --- a/src/IssuersField.php +++ b/src/IssuersField.php @@ -117,6 +117,18 @@ public function get_form_editor_field_settings() { ]; } + /** + * Returns the field's form editor icon. + * + * This could be an icon url or a gform-icon class. + * + * @link https://github.com/pronamic/gravityforms/blob/2.7.3/includes/fields/class-gf-field-address.php#L51-L62 + * @return string + */ + public function get_form_editor_field_icon() { + return 'gform-icon--quiz'; + } + /** * Get the iDEAL gateway for this field. * diff --git a/src/PaymentMethodsField.php b/src/PaymentMethodsField.php index 3327d0e..2ce66b7 100644 --- a/src/PaymentMethodsField.php +++ b/src/PaymentMethodsField.php @@ -180,6 +180,18 @@ public function get_form_editor_field_settings() { ]; } + /** + * Returns the field's form editor icon. + * + * This could be an icon url or a gform-icon class. + * + * @link https://github.com/pronamic/gravityforms/blob/2.7.3/includes/fields/class-gf-field-address.php#L51-L62 + * @return string + */ + public function get_form_editor_field_icon() { + return 'gform-icon--credit-card'; + } + /** * Get the gateways for this field. *