'get_default_language' ) && 'all' === $sitepress->get_current_language() ) { $restUrl = str_replace( get_home_url( null, '/all/' ), get_home_url( null, '/' . $sitepress->get_default_language() . '/' ), $restUrl ); } } return $restUrl; } /** * Exclude the home path from a full path. * * @since 1.2.3 Moved from aioseo-redirects. * @version 4.5.8 * * @param string $path The original path. * @return string The path without WP's home path. */ public function excludeHomePath( $path ) { return preg_replace( '@^' . $this->getHomePath() . '@', '/', $path ); } }