Skip to content

Commit

Permalink
Update Optimize class to follow site permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timotei-litespeed committed Oct 30, 2024
1 parent cc3915e commit 47e8076
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/optimize.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ public function finalize($content)
private function _optimize()
{
global $wp;
$this->_request_url = home_url($wp->request);
$this->_request_url = get_permalink();
// Backup, in case get_permalink() fails.
if (!$this->_request_url) {
$this->_request_url = home_url($wp->request);
}

$this->cfg_css_min = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_CSS_MIN);
$this->cfg_css_comb = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_CSS_COMB);
Expand Down

0 comments on commit 47e8076

Please sign in to comment.