diff --git a/includes/core/class-permalinks.php b/includes/core/class-permalinks.php index a17547cf..5f3ce7e7 100644 --- a/includes/core/class-permalinks.php +++ b/includes/core/class-permalinks.php @@ -11,7 +11,7 @@ if ( ! class_exists( 'Permalinks' ) ) { function __construct() { - $this->current_url = $this->get_current_url(); + add_action( 'init', array( &$this, 'set_current_url' ), 0 ); add_action( 'init', array( &$this, 'check_for_querystrings' ), 1 ); @@ -25,6 +25,13 @@ if ( ! class_exists( 'Permalinks' ) ) { } + /** + * Set current URL variable + */ + function set_current_url() { + $this->current_url = $this->get_current_url(); + } + /*** *** @SEO canonical href bugfix