Description
Update the track with the "correct" versionWhat about the content? That may have been updated manually. That's a reason to have used a shortcode … but we could check the content against the fields and see if it still matches and only replace the content if it does still match.
Usage
oik_tunes_update_track( $post, $result );Parameters
- $post
- ( mixed ) required –
- $result
- ( mixed ) required –
Returns
voidSource
File name: oik-tunes/admin/oik-tunes.phpLines:
1 to 21 of 21
function oik_tunes_update_track( $post, $result ) { $oikt_album = oik_tunes_query_recording( $result ); // $content = oik_tunes_create_track_content( $result, $oikt_album ); //$post = array( 'post_type' => "oik-track" // , 'post_title' => $result['_oikt_title'] // , 'post_name' => $result['_oikt_title'] // , 'post_content' => $content // , 'post_status' => 'publish' // , 'post_date' => oik_tunes_create_post_date( $result ) // ); //} /* Set metadata fields */ $_POST['_oikt_recording'] = $oikt_album; $_POST['_oikt_track'] = bw_array_get( $result, "_oikt_track", null ); $_POST['_oikt_duration'] = bw_array_get( $result, "_oikt_duration", null ); $_POST['_oikt_composer'] = bw_array_get( $result, "_oikt_composer", null ); $_POST['_oikt_UFI'] = bw_array_get( $result, "_oikt_UFI", null ); $post_id = wp_update_post( $post, TRUE ); bw_trace2( $post_id ); return( $post->ID ); }View on GitHub
Invoked by
Calls
1 to 2 of 2
Call hooks
API Letters:
