Skip to content

Commit e3c897c

Browse files
authored
Add support for XSL files (#881)
1 parent 51ec923 commit e3c897c

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- [#877](https://github.com/leonstafford/wp2static/issues/877): Detect from web UI was not adding any URLs. @timothylcooke
3232
- [#878](https://github.com/leonstafford/wp2static/issues/878): Fix deletion of old pages when crawl returns 404. @timothylcooke
3333
- [#868](https://github.com/WP2Static/wp2static/pull/868): Detect files in Divi et-cache/ directory when present. @dunklerfox
34+
- [#881](https://github.com/WP2Static/wp2static/pull/881): Crawl XSL files. @vladstanca
3435

3536
## WP2Static 7.1.7 (2021-09-04)
3637

src/FileProcessor.php

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public function processFile( string $filename ) : void {
4242
case 'xml':
4343
do_action( 'wp2static_process_xml', $filename );
4444
break;
45+
case 'xsl':
46+
do_action( 'wp2static_process_xsl', $filename );
47+
break;
4548
}
4649
}
4750
}

src/WordPressAdmin.php

+7
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,13 @@ public static function registerHooks( string $bootstrap_file ) : void {
281281
1
282282
);
283283

284+
add_action(
285+
'wp2static_process_xsl',
286+
[ SimpleRewriter::class, 'rewrite' ],
287+
10,
288+
1
289+
);
290+
284291
add_action(
285292
'save_post',
286293
[ Controller::class, 'wp2staticSavePostHandler' ],

0 commit comments

Comments
 (0)