We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af11b06 commit 293da12Copy full SHA for 293da12
1 file changed
src/Controller.php
@@ -22,7 +22,7 @@ public function run() : void {
22
23
add_action(
24
'wp2static_post_deploy_trigger',
25
- [ 'WP2StaticS3\Deployer', 'cloudfront_invalidate_all_items' ],
+ [ $this, 'post_deploy_trigger' ],
26
15,
27
1
28
);
@@ -226,6 +226,12 @@ public function deploy( string $processed_site_path ) : void {
226
$s3_deployer->upload_files( $processed_site_path );
227
}
228
229
+ public static function post_deploy_trigger() : void {
230
+ if ( Controller::getValue( 'cfInvalidateAllFiles' ) ) {
231
+ \WP2StaticS3\Deployer::cloudfront_invalidate_all_items();
232
+ }
233
234
+
235
public static function activate_for_single_site() : void {
236
global $wpdb;
237
0 commit comments