You appear to be a bot. Output may be restricted
Description
Find a post in an array of post using the specified $matchfunc This routine will not find the $given post
Usage
bw_find_post( $posts, $given, $matchfunc );
Parameters
- $posts
- ( mixed ) required –
- $given
- ( mixed ) required –
- $matchfunc
- ( mixed ) optional default: bw_match_byguid_name –
Returns
voidSource
File name: oik/shortcodes/oik-attachments.phpLines:
1 to 12 of 12
function bw_find_post( $posts, $given, $matchfunc="bw_match_byguid_name" ) { $matched = NULL; foreach ( $posts as $post ) { if ( $post->ID <> $given->ID ) { if ( $matchfunc( $given, $post ) ) { $matched = $post; break; } } } return( $matched ); }View on GitHub View on Trac