| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FirePlugins Framework |
| 4 | - * @version 1.0.27 | |
| 4 | + * @version 1.1.132 | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <[email protected]> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2022 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2025 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | namespace FPFramework\Base; |
| @@ -37,10 +37,15 @@ | ||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | public function getHost() |
| 40 | 40 | { |
| 41 | - $parse = parse_url($this->path); | |
| 41 | + $parse = wp_parse_url($this->path); | |
| 42 | 42 | |
| 43 | + if (!isset($parse['host'])) | |
| 44 | + { | |
| 45 | + return; | |
| 46 | + } | |
| 47 | + | |
| 43 | 48 | return $parse['host']; |
| 44 | 49 | } |
| 45 | 50 | |
| 46 | 51 | public function getDomainName() |
| @@ -61,10 +66,10 @@ | ||
| 61 | 66 | { |
| 62 | 67 | return true; |
| 63 | 68 | } |
| 64 | 69 | |
| 65 | - $site_parse = parse_url($this->factory->getURL()); | |
| 70 | + $site_parse = wp_parse_url($this->factory->getURL()); | |
| 66 | 71 | $siteHost = $site_parse['host']; |
| 67 | 72 | |
| 68 | 73 | return preg_match('#' . preg_quote($siteHost, '#') . '#', $host) ? true : false; |
| 69 | 74 | } |
| 70 | 75 | } |