File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,6 +178,16 @@ public static function seedOptions() : void {
178178 );
179179
180180 $ wpdb ->query ( $ query );
181+
182+ $ query = $ wpdb ->prepare (
183+ $ query_string ,
184+ 'cfMaxPathsToInvalidate ' ,
185+ '' ,
186+ 'Maximum number of paths to invalidate before triggering a full invalidation ' ,
187+ ''
188+ );
189+
190+ $ wpdb ->query ( $ query );
181191 }
182192
183193 /**
@@ -403,6 +413,12 @@ public static function saveOptionsFromUI() : void {
403413 [ 'name ' => 's3CacheControl ' ]
404414 );
405415
416+ $ wpdb ->update (
417+ $ table_name ,
418+ [ 'value ' => sanitize_text_field ( $ _POST ['cfMaxPathsToInvalidate ' ] ) ],
419+ [ 'name ' => 'cfMaxPathsToInvalidate ' ]
420+ );
421+
406422 wp_safe_redirect ( admin_url ( 'admin.php?page=wp2static-s3 ' ) );
407423 exit ;
408424 }
Original file line number Diff line number Diff line change 217217 </td>
218218 </tr>
219219
220+ <tr>
221+ <td style="width:50%;">
222+ <label
223+ for="<?php echo $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->name ; ?> "
224+ ><?php echo $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->label ; ?> </label>
225+ </td>
226+ <td>
227+ <input
228+ id="<?php echo $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->name ; ?> "
229+ name="<?php echo $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->name ; ?> "
230+ type="text"
231+ value="<?php echo $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->value !== '' ? $ view ['options ' ]['cfMaxPathsToInvalidate ' ]->value : '' ; ?> "
232+ />
233+ </td>
234+ </tr>
220235
221236 </tbody>
222237</table>
You can’t perform that action at this time.
0 commit comments