Description
Determine the post_id of the oik-recording based on: We can't really use album title and artist so why not try the MPCI – mediaprimaryclassid as the key Another way would be to have it included in the $result array!
Usage
oik_tunes_query_recording( $result );Parameters
- $result
- ( mixed ) required –
Returns
voidSource
File name: oik-tunes/admin/oik-tunes.phpLines:
1 to 19 of 19
function oik_tunes_query_recording( $result ) { oik_require( "includes/bw_posts.php" ); $atts = array(); $atts['post_type'] = "oik-recording" ; $atts['numberposts'] = 1; $atts['meta_key'] = "_oikt_URI"; $atts['meta_value'] = bw_array_get( $result, "_oikt_URI", null ); $posts = bw_get_posts( $atts ); $post = bw_array_get( $posts, 0, null ); bw_trace2( $post, "oik-recording?" ); if ( !$post ) { p( "Creating a new recording for: {$result['_oikt_album']} " ); $post_id = oik_tunes_create_recording( $result ); } else { $post_id = $post->ID; p( "Recording already exists as $post_id" ); } return( $post_id ); }View on GitHub
Called by
1 to 2 of 2
Invoked by
Calls
1 to 3 of 3
Call hooks
API Letters:
