Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ids = explode( ',', $this->value() );
- foreach ( $ids as $attachment_id ) {
- if ($attachment_id != '' ) :
- $edit_fields = get_attachment_fields_to_edit( get_post( $attachment_id ) );
- $img = wp_get_attachment_image_src( $attachment_id, 'large' ); ?>
- <div class="slide-image">
- <img src=" <?php echo esc_url( $img[0] ); ?> " data-id=" <?php echo $attachment_id ?> ">
- <div class="slide-title">
- <h3>
- <?php echo $edit_fields['post_title']['label']; ?>
- </h3>
- <?php echo $edit_fields['post_title']['html']; ?>
- </div>
- <div class="slide-description">
- <h3>
- <?php echo $edit_fields['post_content']['label']; ?>
- </h3>
- <?php echo $edit_fields['post_content']['html']; ?>
- </div>
- <div class="slide-url">
- <h3>
- <?php echo $edit_fields['rtslider_link']['label']; ?>
- </h3>
- <?php echo $edit_fields['rtslider_link']['html']; ?>
- </div>
- <div class="slide-url">
- <h3>
- <?php echo $edit_fields['cta_button']['label']; ?>
- </h3>
- <?php echo $edit_fields['cta_button']['html']; ?>
- </div>
- <button type="button" class="button remove_slide_button">Remove Slide</button>
- </div>
- <?php endif;
- }
Add Comment
Please, Sign In to add comment