Commit 63fa0be8 authored by Erick Hitter's avatar Erick Hitter

Don't rewrite if we aren't ready

parent 0ac201d3
......@@ -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' );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment