File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,6 +175,16 @@ public static function seedOptions() : void {
175175 );
176176
177177 $ wpdb ->query ( $ query );
178+
179+ $ query = $ wpdb ->prepare (
180+ $ query_string ,
181+ 's3CacheControl ' ,
182+ 'public, max-age=900 ' ,
183+ 'Cache-Control header value ' ,
184+ ''
185+ );
186+
187+ $ wpdb ->query ( $ query );
178188 }
179189
180190 /**
@@ -394,6 +404,12 @@ public static function saveOptionsFromUI() : void {
394404 [ 'name ' => 's3RemotePath ' ]
395405 );
396406
407+ $ wpdb ->update (
408+ $ table_name ,
409+ [ 'value ' => sanitize_text_field ( $ _POST ['s3CacheControl ' ] ) ],
410+ [ 'name ' => 's3CacheControl ' ]
411+ );
412+
397413 wp_safe_redirect ( admin_url ( 'admin.php?page=wp2static-s3 ' ) );
398414 exit ;
399415 }
Original file line number Diff line number Diff line change 111111 </td>
112112 </tr>
113113
114+ <tr>
115+ <td style="width:50%;">
116+ <label
117+ for="<?php echo $ view ['options ' ]['s3CacheControl ' ]->name ; ?> "
118+ ><?php echo $ view ['options ' ]['s3CacheControl ' ]->label ; ?> </label>
119+ </td>
120+ <td>
121+ <input
122+ id="<?php echo $ view ['options ' ]['s3CacheControl ' ]->name ; ?> "
123+ name="<?php echo $ view ['options ' ]['s3CacheControl ' ]->name ; ?> "
124+ type="text"
125+ value="<?php echo $ view ['options ' ]['s3CacheControl ' ]->value !== '' ? $ view ['options ' ]['s3CacheControl ' ]->value : '' ; ?> "
126+ />
127+ </td>
128+ </tr>
129+
114130 </tbody>
115131</table>
116132
You can’t perform that action at this time.
0 commit comments