-
-
Save doekenorg/d8561e2c9a4fb3c4a90cd6987d2c4cca to your computer and use it in GitHub Desktop.
wp-pay-extension unselect choices filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
$unselect_choices = gf_apply_filters( | |
[ | |
'pronamic_pay_unselect_choices', | |
$form_id, | |
$this->id | |
], | |
!$page || ('form_editor' !== $page && false === strpos($page, 'form_settings')), | |
$page | |
); | |
if ($unselect_choices) { | |
$choices = array_filter($choices, array($this, 'filter_choice_is_selected')); | |
$choices = array_map(array($this, 'unselect_choice'), $choices); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment