You appear to be a bot. Output may be restricted
Description
Usage
oikp_get_attachment( $version );
Parameters
- $version
- ( mixed ) required –
Returns
void
Source
File name: oik-plugins/feed/oik-plugins-feed.php
Lines:
1 to 18 of 18
function oikp_get_attachment( $version ) { oik_require( "includes/bw_posts.php" ); $atts = array( "post_type" => "attachment" , "post_parent" => $version->ID , "numberposts" => 1 , "post_mime_type" => "application/zip" ); $posts = bw_get_posts( $atts ); $attachment = bw_array_get( $posts, 0, null ); bw_trace2( $attachment ); if ( $attachment ) { $file = get_post_meta( $attachment->ID, "_wp_attached_file", true ); } else { $file = null; } bw_trace2( $file ); return( $file ); }