Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. function update_releases($complete_array) {
  2.    
  3.     $release_pod = pods('release');
  4.    
  5.     foreach ($complete_array as $split) {
  6.        
  7.         foreach ($split as $item) {
  8.            
  9.             $pod_id = $item['rel_id'];
  10.             $pod_img = pods_attachment_import( $item['rel_cover_url'], $pod_id, false );
  11.            
  12.             $data = array(
  13.                 'rel_spotify_url' => $item['rel_spotify_url'],
  14.                 'rel_cover' => $pod_img
  15.             );
  16.            
  17.             $release_pod->save($data, null, $pod_id);
  18.                
  19.         }
  20.    
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement