You appear to be a bot. Output may be restricted
Description
Format links to the Attachment(s) (format=A)
When the post we're currently processing is an "attachment" we already have the ID of the post but we need to find the attachment file name When the post is something else we still need to find the attachments
Usage
bw_field_function_attachment( $post, $atts, $f );
Parameters
- $post
- ( object ) required –
- $atts
- ( array ) required –
- $f
- ( mixed ) required –
Returns
void
Source
File name: oik/includes/bw_formatter.php
Lines:
1 to 12 of 12
function bw_field_function_attachment( $post, &$atts, $f ) { oik_require( "shortcodes/oik-attachments.php" ); $atts['titles'] = bw_array_get( $atts, "titles", "n" ); if ($post->post_type == "attachment" ) { bw_format_attachment( $post, $atts ); } else { $args = array( "post_parent" => $post->ID ); $args['titles'] = $atts['titles']; $attachments = bw_attachments( $args ); e( $attachments ); } }