Skip to content

Commit

Permalink
Use checked()
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Nov 29, 2021
1 parent a0b0106 commit f009b0e
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions inc/class-destination-s3.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,11 @@ class="regular-text"
</legend>
<label for="s3base_multipart">
<input name="s3base_multipart" type="checkbox"
value="1" <?= !empty(
BackWPup_Option::get(
$jobid,
's3base_multipart'
)
) ? 'checked="checked"' : '' ?>>
value="1" <?= checked(
BackWPup_Option::get(
$jobid,
's3base_multipart'
), 1) ?>>
<?php esc_html_e(
'Destination supports multipart',
'backwpup'
Expand All @@ -159,12 +158,11 @@ class="regular-text"
<label
for="s3base_pathstylebucket">
<input name="s3base_pathstylebucket" type="checkbox"
value="1" <?= !empty(
value="1" <?= checked(
BackWPup_Option::get(
$jobid,
's3base_pathstylebucket'
)
) ? 'checked="checked"' : '' ?>>
), 1) ?>>
<?php esc_html_e(
'Destination provides only Pathstyle buckets',
'backwpup'
Expand Down Expand Up @@ -1110,10 +1108,10 @@ function awsgetbucket() {
s3bucketselected: $( 'input[name="s3bucketselected"]' ).val(),
s3base_url : $( 'input[name="s3base_url"]' ).val(),
s3region : $( '#s3region' ).val(),
s3base_region : $( 'input[name="s3base_region"]' ).val(),
s3base_version : $( 'input[name="s3base_version"]' ).val(),
s3base_signature : $( 'input[name="s3base_signature"]' ).val(),
s3base_multipart : $( 'input[name="s3base_multipart"]' ).is(':checked'),
s3base_region : $( 'input[name="s3base_region"]' ).val(),
s3base_version : $( 'input[name="s3base_version"]' ).val(),
s3base_signature : $( 'input[name="s3base_signature"]' ).val(),
s3base_multipart : $( 'input[name="s3base_multipart"]' ).is(':checked'),
s3base_pathstylebucket : $( 'input[name="s3base_pathstylebucket"]' ).is(':checked'),
_ajax_nonce : $( '#backwpupajaxnonce' ).val()
};
Expand Down

0 comments on commit f009b0e

Please sign in to comment.