You appear to be a bot. Output may be restricted
Description
Return the block of text after the last slash, if there is one, for the selected $social field in $optionsThis routine saves us getting confused with parse_url() returning strange results on URLs such as http://www.twitter.com/!#/twittername when all we actually want is the user's twittername (without the @ )
Usage
$string = oiku_simplify_social( $options, $social );
Parameters
- $options
- ( array ) required – array of fields
- $social
- ( string ) required – the index of the field from which to extract the value
Returns
string the simplified valueSource
File name: oik-user/admin/oik-user.phpLines:
1 to 8 of 8
function oiku_simplify_social( $options, $social ) { $option = bw_array_get( $options, $social, null ); if ( $option ) { $splits = explode( "/", $option ); $option = array_pop( $splits); } return( $option ); }View on GitHub