← All changes
|
admin/views/sp-framework/fields/gallery/gallery.php
+12
-10
2.4.11
→
2.2.10
View file →
| @@ -32,18 +32,18 @@ | ||
| 32 | 32 | |
| 33 | 33 | $args = wp_parse_args( |
| 34 | 34 | $this->field, |
| 35 | 35 | array( |
| 36 | - 'add_title' => esc_html__( 'Add Gallery', 'post-carousel' ), | |
| 37 | - 'edit_title' => esc_html__( 'Edit Gallery', 'post-carousel' ), | |
| 38 | - 'clear_title' => esc_html__( 'Clear', 'post-carousel' ), | |
| 36 | + 'add_title' => esc_html__( 'Add Gallery', 'smart-post-show' ), | |
| 37 | + 'edit_title' => esc_html__( 'Edit Gallery', 'smart-post-show' ), | |
| 38 | + 'clear_title' => esc_html__( 'Clear', 'smart-post-show' ), | |
| 39 | 39 | ) |
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | $hidden = ( empty( $this->value ) ) ? ' hidden' : ''; |
| 43 | 43 | |
| 44 | - echo wp_kses_post( $this->field_before() ); | |
| 45 | - echo '<a href="#" class="button button-primary spf-button"><i class="fa fa-plus-circle"></i>' . esc_html( $args['add_title'] ) . '</a>'; | |
| 44 | + echo $this->field_before(); | |
| 45 | + echo '<a href="#" class="button button-primary spf-button"><i class="fa fa-plus-circle"></i>' . $args['add_title'] . '</a>'; | |
| 46 | 46 | echo '<ul class="sp-gallery-images">'; |
| 47 | 47 | if ( ! empty( $this->value ) ) { |
| 48 | 48 | |
| 49 | 49 | $values = explode( ',', $this->value ); |
| @@ -49,19 +49,21 @@ | ||
| 49 | 49 | $values = explode( ',', $this->value ); |
| 50 | 50 | |
| 51 | 51 | foreach ( $values as $id ) { |
| 52 | 52 | $attachment = wp_get_attachment_image_src( $id, 'thumbnail' ); |
| 53 | - echo '<li><img src="' . esc_url( $attachment[0] ) . '"/></li>'; | |
| 53 | + echo '<li><img src="' . $attachment[0] . '"/></li>'; | |
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | echo '</ul>'; |
| 58 | 58 | |
| 59 | - echo '<ul><li><a href="#" class="button spf-edit-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-pencil-square-o"></i>' . esc_html( $args['edit_title'] ) . '</a></li></ul>'; | |
| 60 | - echo '<ul><li><a href="#" class="button spf-warning-primary spf-clear-gallery' . esc_attr( $hidden ) . '"><i class="fa fa-trash"></i>' . esc_html( $args['clear_title'] ) . '</a></li></ul>'; | |
| 61 | - echo '<input type="text" name="' . esc_attr( $this->field_name() ) . '" value="' . esc_attr( $this->value ) . '"' . wp_kses_post( $this->field_attributes() ) . '/></span>'; | |
| 59 | + // echo '<a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a>'; | |
| 60 | + // echo '<a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a>'; | |
| 61 | + echo '<ul><li><a href="#" class="button spf-edit-gallery' . $hidden . '"><i class="fa fa-pencil-square-o"></i>' . $args['edit_title'] . '</a></li></ul>'; | |
| 62 | + echo '<ul><li><a href="#" class="button spf-warning-primary spf-clear-gallery' . $hidden . '"><i class="fa fa-trash"></i>' . $args['clear_title'] . '</a></li></ul>'; | |
| 63 | + echo '<input type="text" name="' . $this->field_name() . '" value="' . $this->value . '"' . $this->field_attributes() . '/></span>'; | |
| 62 | 64 | |
| 63 | - echo wp_kses_post( $this->field_after() ); | |
| 65 | + echo $this->field_after(); | |
| 64 | 66 | |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | } |