File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,6 +195,16 @@ public static function seedOptions() : void {
195195
196196 $ wpdb ->query ( $ query );
197197
198+ $ query = $ wpdb ->prepare (
199+ $ query_string ,
200+ 's3ObjectACL ' ,
201+ 'public-read ' ,
202+ 'Object ACL ' ,
203+ ''
204+ );
205+
206+ $ wpdb ->query ( $ query );
207+
198208 $ query = $ wpdb ->prepare (
199209 $ query_string ,
200210 'cfMaxPathsToInvalidate ' ,
@@ -433,6 +443,12 @@ public static function saveOptionsFromUI() : void {
433443 [ 'name ' => 's3CacheControl ' ]
434444 );
435445
446+ $ wpdb ->update (
447+ $ table_name ,
448+ [ 'value ' => sanitize_text_field ( $ _POST ['s3ObjectACL ' ] ) ],
449+ [ 'name ' => 's3ObjectACL ' ]
450+ );
451+
436452 $ wpdb ->update (
437453 $ table_name ,
438454 [ 'value ' => sanitize_text_field ( $ _POST ['cfMaxPathsToInvalidate ' ] ) ],
@@ -477,4 +493,5 @@ public function addOptionsPage() : void {
477493 [ $ this , 'renderS3Page ' ]
478494 );
479495 }
480- }
496+ }
497+
Original file line number Diff line number Diff line change 127127 </td>
128128 </tr>
129129
130+ <tr>
131+ <td style="width:50%;">
132+ <label
133+ for="<?php echo $ view ['options ' ]['s3ObjectACL ' ]->name ; ?> "
134+ ><?php echo $ view ['options ' ]['s3ObjectACL ' ]->label ; ?> </label>
135+ </td>
136+ <td>
137+ <select
138+ id="<?php echo $ view ['options ' ]['s3ObjectACL ' ]->name ; ?> "
139+ name="<?php echo $ view ['options ' ]['s3ObjectACL ' ]->name ; ?> "
140+ >
141+ <option
142+ <?php if ( $ view ['options ' ]['s3ObjectACL ' ]->value === 'public-read ' ) { echo "selected " ; } ?>
143+ value="public-read">public-read</option>
144+ <option
145+ <?php if ( $ view ['options ' ]['s3ObjectACL ' ]->value === 'private ' ) { echo "selected " ; } ?>
146+ value="private">private</option>
147+ </select>
148+ </td>
149+ </tr>
150+
130151 </tbody>
131152</table>
132153
You can’t perform that action at this time.
0 commit comments