dimanche 13 août 2017

Radio Button value dilemma

$instance['what_to_check_for']   = sanitize_text_field($new_instance['what_to_check_for']);

Now I a trying to do something through ternary operators →

$description_radio_box = $instance[ 'what_to_check_for' ] ? 'check_for_counter' : 'check_for_image';

basically I am trying to find a condition →

<?php if( $description_radio_box == 'check_for_counter' ){ ?>

or

                <?php if( $description_radio_box == 'check_for_image' )

Is my approach correct or I am misisng something because the two above conditions doesnt work?

Aucun commentaire:

Enregistrer un commentaire