Created
December 22, 2011 20:08
-
-
Save jeremyboggs/1511651 to your computer and use it in GitHub Desktop.
Inserting multiple files for an item.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$files = array( | |
'http://example.com/file1.txt' => array( | |
'Dublin Core' => array( | |
'Title' => array('text' => 'Title of my first item'), | |
'Description' => array('text' => 'Description of my first item.') | |
) | |
), | |
'http://example.com/file2.txt' => array( | |
'Dublin Core' => array( | |
'Title' => array('text' => 'Title of my second item'), | |
'Description' => array('text' => 'Description of my second item.') | |
) | |
), | |
); | |
foreach ($files as $url => $metadata) { | |
insert_files_for_item($item, 'URL', array('source' => $url, 'name' => null, 'metadata' => $metadata); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment