Created
October 19, 2017 19:06
-
-
Save ScottDeLuzio/af61b942c945f55533bbf93e295fb47e to your computer and use it in GitHub Desktop.
Filters the output of radio buttons in Conditional Woo Checkout Field Pro
This file contains hidden or 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 | |
add_filter( 'cwcfp_radio_input_filter', 'custom_radio_button_field', 10, 4 ); | |
function custom_radio_button_field( $option_key, $option_text, $key, $value ){ | |
$options = '<label class="radio-input block">' . $option_text . '</label><input type="radio" name="' . $key . '" id="' . $key . '" value="' . $option_key . '" ' . selected( $value, $option_key, false ) . 'class="select">' . $option_text . "\r\n"; | |
return $options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment