File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed
Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -618,9 +618,6 @@ public static function wp2staticProcessQueue(): void {
618618 case 'post_process ' :
619619 WsLog::l ( 'Starting post-processing ' );
620620 $ post_processor = new PostProcessor ();
621- $ processed_site_dir =
622- SiteInfo::getPath ( 'uploads ' ) . 'wp2static-processed-site ' ;
623- $ processed_site = new ProcessedSite ();
624621 $ post_processor ->processStaticSite ( StaticSite::getPath () );
625622 WsLog::l ( 'Post-processing completed ' );
626623 break ;
@@ -721,9 +718,6 @@ public static function wp2staticHeadless(): void {
721718
722719 WsLog::l ( 'Starting post-processing ' );
723720 $ post_processor = new PostProcessor ();
724- $ processed_site_dir =
725- SiteInfo::getPath ( 'uploads ' ) . 'wp2static-processed-site ' ;
726- $ processed_site = new ProcessedSite ();
727721 $ post_processor ->processStaticSite ( StaticSite::getPath () );
728722 WsLog::l ( 'Post-processing completed ' );
729723
Original file line number Diff line number Diff line change @@ -261,6 +261,13 @@ public static function optionSpecs(): array {
261261 'Crawled Site Path ' ,
262262 'Path to the crawled site files. '
263263 ),
264+ self ::makeOptionSpec (
265+ 'string ' ,
266+ 'processedSitePath ' ,
267+ 'wp2static-processed-site ' ,
268+ 'Processed Site Path ' ,
269+ 'Path to the processed site files. '
270+ ),
264271 self ::makeOptionSpec (
265272 'array ' ,
266273 'pathsToIgnore ' ,
@@ -867,6 +874,17 @@ public static function savePosted( string $screen = 'core' ): void {
867874 [ 'name ' => 'crawledSitePath ' ]
868875 );
869876
877+ $ wpdb ->update (
878+ $ table_name ,
879+ [
880+ 'value ' =>
881+ sanitize_text_field (
882+ strval ( filter_input ( INPUT_POST , 'processedSitePath ' ) )
883+ ),
884+ ],
885+ [ 'name ' => 'processedSitePath ' ]
886+ );
887+
870888 $ paths_to_ignore = preg_replace (
871889 '/^\s+|\s+$/m ' ,
872890 '' ,
Original file line number Diff line number Diff line change 6464
6565 <table class="widefat striped">
6666 <tbody>
67+ <?php echo $ row ( 'processedSitePath ' ); ?>
6768 <?php echo $ row ( 'skipURLRewrite ' ); ?>
6869 <?php echo $ row ( 'hostsToRewrite ' ); ?>
6970 </tbody>
You can’t perform that action at this time.
0 commit comments