Skip to content

Commit

Permalink
Add support for XSL files (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladstanca committed Jan 8, 2023
1 parent 51ec923 commit e3c897c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions src/FileProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/WordPressAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down

0 comments on commit e3c897c

Please sign in to comment.