Skip to content
Snippets Groups Projects
Commit 63fa0be8 authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't rewrite if we aren't ready

parent 0ac201d3
No related branches found
No related tags found
3 merge requests!6add linting,!5WIP: Add JUnit reporting,!4WIP: Initial release
This commit is part of merge request !6. Comments created here will be created in the context of that merge request.
......@@ -58,10 +58,11 @@ function init() {
Options::instance();
URL::instance();
// Don't rewrite in the admin!
if ( is_admin() ) {
Options_Page::instance();
} else {
}
if ( URL::instance()->can_rewrite() ) {
Rewrite_URLs::instance();
Rewrite_Content::instance();
}
......
......@@ -19,6 +19,11 @@ class URL {
* @return bool
*/
public function can_rewrite() : bool {
// Never rewrite in admin.
if ( is_admin() ) {
return false;
}
$host = Options::instance()->get( 'host' );
$key = Options::instance()->get( 'key' );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment