$scheme, 'host' => strtolower( $parts['host'] ), 'port' => isset( $parts['port'] ) ? (int) $parts['port'] : null, ); } /** * A constant from wp-config.php, or the default. * * @param string $name The constant's name. * @param string $fallback The live value. * @return string */ private static function constant_url( $name, $fallback ) { if ( defined( $name ) && is_string( constant( $name ) ) && '' !== constant( $name ) ) { return untrailingslashit( esc_url_raw( constant( $name ) ) ); } return $fallback; } }