Skip to content

Commit

Permalink
Use checked() for outputting the HTML checked attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
renintw committed Jul 20, 2023
1 parent 8ededd5 commit ccc5851
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class="regular-text"
id="_wcpt_sponsor_first_time_yes"
name="_wcpt_sponsor_first_time"
value="yes"
<?php echo 'yes' === $first_time ? 'checked' : ''; ?>
<?php checked( $first_time, 'yes' ); ?>
/>
</li>
<li>
Expand All @@ -305,7 +305,7 @@ class="regular-text"
id="_wcpt_sponsor_first_time_no"
name="_wcpt_sponsor_first_time"
value="no"
<?php echo 'no' === $first_time ? 'checked' : ''; ?>
<?php checked( $first_time, 'no' ); ?>
/>
</li>
<li>
Expand All @@ -317,7 +317,7 @@ class="regular-text"
id="_wcpt_sponsor_first_time_unsure"
name="_wcpt_sponsor_first_time"
value="unsure"
<?php echo 'unsure' === $first_time ? 'checked' : ''; ?>
<?php checked( $first_time, 'unsure' ); ?>
/>
</li>
</ul>
Expand Down

0 comments on commit ccc5851

Please sign in to comment.