You appear to be a bot. Output may be restricted
Description
Return TRUE if the file names of the files are the same and the first is of type $extensionWe ignore the path information since the files could have been uploaded and attached in different months This is a case sensitive search ? This should have been defined to pass a third parm of args which is an array of key value pairs that way we can pass args to the $matchfunc
Usage
bw_match_byguid_name( $given, $post, $extension );
Parameters
- $given
- ( mixed ) required –
- $post
- ( mixed ) required –
- $extension
- ( mixed ) optional default: pdf –
Returns
voidSource
File name: oik/shortcodes/oik-attachments.phpLines:
1 to 6 of 6
function bw_match_byguid_name( $given, $post, $extension='pdf' ) { $given_guid_name = pathinfo( $given->guid ); $post_guid_name = pathinfo( $post->guid ); $matched = ( $given_guid_name['extension'] == $extension && $given_guid_name['filename'] == $post_guid_name['filename'] ); return( $matched ); }View on GitHub View on Trac