Advertisement
mattbailey

WPAlchemy MediaAccess Loop

Nov 11th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <div class="my_meta_control">
  2.  
  3.     <p><a style="float:right; margin:0 10px;" href="#" class="dodelete-images button">Remove All Additional Images</a></p>
  4.  
  5.     <p>Add additional images by clicking the Upload Image button.</p>
  6.  
  7.     <?php $options = array( 'length' => 3, 'limit' => 99 ); ?>
  8.     <?php while( $mb->have_fields_and_multi( 'images', $options ) ): ?>
  9.     <?php $mb->the_group_open(); ?>
  10.  
  11.         <?php $mb->the_field('imageurl'); ?>
  12.         <label>Image URL</label>
  13.         <?php $wpalchemy_media_access->setInsertButtonLabel( 'Insert Image' )->setTab( 'type' ); ?>
  14.         <p>
  15.             <?php echo $wpalchemy_media_access->getField( array( 'name' => $mb->get_the_name(), 'value' => $mb->get_the_value() ) ); ?>
  16.             <?php echo $wpalchemy_media_access->getButton( array( 'label' => 'Insert Image' ) ); ?>
  17.             <a href="#" class="dodelete button">Remove Image</a>
  18.         </p>
  19.  
  20.     <?php $mb->the_group_close(); ?>
  21.     <?php endwhile; ?>
  22.  
  23.     <p style="margin-bottom:15px; padding-top:5px;"><a href="#" class="docopy-images button">Add Another Image</a></p>
  24.  
  25. </div>
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement