Description
Returns the URL for the social network
Usage
$string = bw_social_url( $lc_social, $social );Parameters
- $lc_social
- ( string ) required – lower case version of the social network name
- $social
- ( string ) required – stored value – may only be the user name – e.g. the Twitter username without @
Returns
string $social_url – that might workSource
File name: oik/shortcodes/oik-follow.phpLines:
1 to 15 of 15
function bw_social_url( $lc_social, $social ) { $url = parse_url( $social ); $social_url = bw_array_get( $url, "scheme", "https" ); $social_url .= "://"; $host = bw_array_get( $url, "host", null ); if ( !$host ) { $host = _bw_social_host( $lc_social ); } $social_url .= $host; $path = "/"; $path .= bw_array_get( $url, "path", $social ); $path = str_replace( "//", "/", $path ); $social_url .= $path; return( $social_url ); }View on GitHub View on Trac
Called by
1 to 5 of 5
- bw_follow_link() – Create the link for the selected theme= parameter
- Tests_shortcodes_oik_follow::test_bw_follow_link_dash() –
- Tests_shortcodes_oik_follow::test_bw_follow_link_dash_bb_BB() –
- Tests_shortcodes_oik_follow::test_bw_follow_link_gener() –
- Tests_shortcodes_oik_follow::test_bw_follow_link_gener_bb_BB() –
Invoked by
Calls
1 to 2 of 2
