PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.1
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 4.2.1 All 138 releases
learnpress / inc / admin / meta-box / fields / image-advanced.php

image-advanced.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.1, at inc/admin/meta-box/fields/image-advanced.php

42 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php $option_value = $value['value']; ?>
2
3 <tr valign="top">
4 <th scope="row" class="titledesc">
5 <label for="<?php echo esc_attr( $value['id'] ); ?>"><?php echo wp_kses_post( $value['title'] ); ?> <?php echo wp_kses_post( $tooltip_html ); ?></label>
6 </th>
7 <td class="forminp lp-metabox-field__image-advanced forminp-<?php echo esc_attr( sanitize_title( $value['type'] ) ); ?>">&lrm;
8 <ul class="lp-metabox-field__image-advanced-images">
9 <?php
10 $update_meta = false;
11 $updated_gallery_ids = array();
12
13 if ( ! empty( $option_value ) ) {
14 foreach ( $option_value as $attachment_id ) {
15 $attachment = wp_get_attachment_image( $attachment_id, 'thumbnail' );
16
17 if ( empty( $attachment ) ) {
18 $update_meta = true;
19 continue;
20 }
21 ?>
22 <li class="image" data-attachment_id="<?php echo esc_attr( $attachment_id ); ?>">
23 <?php echo wp_kses_post( $attachment ); ?>
24 <ul class="actions">
25 <li><a href="#" class="delete"><?php esc_html_e( 'Delete', 'learnpress' ); ?></a></li>
26 </ul>
27 </li>
28 <?php
29 $updated_gallery_ids[] = $attachment_id;
30 }
31 }
32 ?>
33 </ul>
34
35 <input type="hidden" id="lp-gallery-images-ids" name="<?php echo esc_attr( $value['id'] ); ?>" value="<?php echo esc_attr( implode( ',', $updated_gallery_ids ) ); ?>" />
36
37 <p class="lp-metabox-field__image-advanced-upload hide-if-no-js">
38 <a href="#" data-choose="<?php esc_attr_e( 'Add images', 'learnpress' ); ?>" data-update="<?php esc_attr_e( 'Add to gallery', 'learnpress' ); ?>" data-delete="<?php esc_attr_e( 'Delete images', 'learnpress' ); ?>" data-text="<?php esc_attr_e( 'Delete', 'learnpress' ); ?>"><?php esc_html_e( 'Add images', 'learnpress' ); ?></a>
39 </p>
40 </td>
41 </tr>
42