PluginProbe
Polylang / 2.5
Polylang v2.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | include/links-model.php +4 -7 2.72.5 View file →
@@ -51,9 +51,9 @@
51 51 *
52 52 * @return array list of hosts
53 53 */
54 54 public function get_hosts() {
55 - return array( wp_parse_url( $this->home, PHP_URL_HOST ) );
55 + return array( parse_url( $this->home, PHP_URL_HOST ) );
56 56 }
57 57
58 58 /**
59 59 * Returns the home url
@@ -75,14 +75,11 @@
75 75 *
76 76 * @param object $language
77 77 */
78 78 protected function set_home_url( $language ) {
79 - // We should always have a default language here, except, temporarily, in PHPUnit tests. The test here protects against PHP notices.
80 - if ( isset( $this->options['default_lang'] ) ) {
81 - $search_url = $this->home_url( $language );
82 - $home_url = empty( $language->page_on_front ) || $this->options['redirect_lang'] ? $search_url : $this->front_page_url( $language );
83 - $language->set_home_url( $search_url, $home_url );
84 - }
79 + $search_url = $this->home_url( $language );
80 + $home_url = empty( $language->page_on_front ) || $this->options['redirect_lang'] ? $search_url : $this->front_page_url( $language );
81 + $language->set_home_url( $search_url, $home_url );
85 82 }
86 83
87 84 /**
88 85 * Sets the home urls and flags before the languages are persistently cached