diff --git a/CHANGELOG.md b/CHANGELOG.md index 6298daab..2b787dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ - [#877](https://github.com/leonstafford/wp2static/issues/877): Detect from web UI was not adding any URLs. @timothylcooke - [#878](https://github.com/leonstafford/wp2static/issues/878): Fix deletion of old pages when crawl returns 404. @timothylcooke - [#868](https://github.com/WP2Static/wp2static/pull/868): Detect files in Divi et-cache/ directory when present. @dunklerfox + - [#881](https://github.com/WP2Static/wp2static/pull/881): Crawl XSL files. @vladstanca ## WP2Static 7.1.7 (2021-09-04) diff --git a/src/FileProcessor.php b/src/FileProcessor.php index 1a5699e5..e706ce88 100755 --- a/src/FileProcessor.php +++ b/src/FileProcessor.php @@ -42,6 +42,9 @@ public function processFile( string $filename ) : void { case 'xml': do_action( 'wp2static_process_xml', $filename ); break; + case 'xsl': + do_action( 'wp2static_process_xsl', $filename ); + break; } } } diff --git a/src/WordPressAdmin.php b/src/WordPressAdmin.php index 27b06cee..d56428d0 100755 --- a/src/WordPressAdmin.php +++ b/src/WordPressAdmin.php @@ -281,6 +281,13 @@ public static function registerHooks( string $bootstrap_file ) : void { 1 ); + add_action( + 'wp2static_process_xsl', + [ SimpleRewriter::class, 'rewrite' ], + 10, + 1 + ); + add_action( 'save_post', [ Controller::class, 'wp2staticSavePostHandler' ],