You appear to be a bot. Output may be restricted
Description
Simulate http_build_urlbut we don't bother with adding port, user or pass since this is really not expected? Or is it? Does set_url_scheme cater for this? or perhaps having it in the "domain" or "siteurl" ?
Usage
$string = bw_build_url( $parts );
Parameters
- $parts
- ( array ) required – URL components
Returns
string URLSource
File name: oik/shortcodes/oik-link.phpLines:
1 to 17 of 17
function bw_build_url( $parts ) { bw_trace2( null, null, true, BW_TRACE_VERBOSE ); $newurl = $parts['scheme']; $newurl .= $parts['host']; if ( !empty( $parts['path'] ) ) { $newurl .= unltrim( $parts['path'] ); } if ( isset( $parts['query'] ) ) { $newurl .= "?"; $newurl .= $parts['query']; } if ( isset( $parts['fragment'] ) ) { $newurl .= "#"; $newurl .= $parts['fragment']; } return( $newurl ); }View on GitHub View on Trac