Description
Create the attachment file name given the URL
Usage
oikms_create_attachment_filename( $atts );Parameters
- $atts
- ( mixed ) required –
Returns
voidSource
File name: oik-mshot/shortcodes/oik-mshot.phpLines:
1 to 14 of 14
function oikms_create_attachment_filename( $atts ) { $url = bw_array_get( $atts, "url", null ); if ( $url ) { $parsed_url = parse_url( $url ); $target_file_name = "mshot-"; $target_file_name .= $parsed_url['host']; $target_file_name .= bw_array_get( $parsed_url, 'path', null ); $target_file_name .= ".jpg"; $target_file_name = str_replace( "/", "-", $target_file_name ); } else { $target_file_name = "unknown.jpg"; } return( $target_file_name ); }View on GitHub
Called by
1 to 2 of 2
Invoked by
Calls
Call hooks
API Letters:
