Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => null,
- 'post_status' => null,
- 'post_parent' => $post->ID
- );
- $attachments = get_posts($args);
- if ($attachments) {
- echo '<ul class="attach_list">';
- foreach ($attachments as $attachment) {
- echo'<li class="attchmt">';
- echo'<a class="remAttachment" href="#">Remove</a>';
- echo'<input type="hidden" id="att_remove" name="att_remove[]" value=" '. $attachment->ID .' " />';
- echo'<input type="hidden" name="nonce" id="nonce" value=" '. wp_create_nonce( 'delete_attachment' ) .' " />';
- echo '<span>';
- echo apply_filters('the_title', ' '.$attachment->post_title);
- echo '</span>'. $attachment->ID .'<a href="#" id="edit-track-tb"> Edit Track Info</a></li>';
- echo '<div id="my-content-id" style="display:none;">';
- echo '<div id="holla">';
- echo '<h2>Update Track Info'. $attachment->ID .'</h2>';
- echo '<label>Artist</label></br>';
- echo '<input class="widefat" type="text" value="'. get_post_meta($attachment->ID, media_artist', true) .'"/></br>';
- echo '<label>Itunes URL</label></br>';
- echo '<input class="widefat" type="text" value="'. get_post_meta($attachment->ID, 'itunes_url', true) .'"/></br>';
- echo '<label>Amazon URL</label></br>';
- echo '<input class="widefat" type="text" value="'. get_post_meta($attachment->ID, 'amazon_url', true) .'"/></br>';
- echo '<label>Other Buy URL</label></br>';
- echo '<input class="widefat" type="text" value="'. get_post_meta($attachment->ID, 'buy_other', true) .'"/></br></br>';
- echo '<input type="button" class="button-primary button-large" value="Update Track"/>';
- echo' </div></div><a href="#TB_inline?width=600&height=550&inlineId=my-content-id" class="thickbox">View my inline content!</a>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement