PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 7.2.2
Jetpack – WP Security, Backup, Speed, & Growth v7.2.2
16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 All 504 releases
jetpack / modules / widgets / gallery / templates / form.php

form.php in Jetpack – WP Security, Backup, Speed, & Growth 7.2.2, at modules/widgets/gallery/templates/form.php

90 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <p>
2 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'jetpack' ); ?>
3 <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>"
4 type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
5 </label>
6 </p>
7
8 <p>
9 <label>
10 <?php esc_html_e( 'Images:', 'jetpack' ); ?>
11 </label>
12 </p>
13
14 <div class="gallery-widget-thumbs-wrapper">
15 <div class="gallery-widget-thumbs">
16 <?php
17
18 // Add the thumbnails to the widget box
19 $attachments = $this->get_attachments( $instance );
20
21 foreach( $attachments as $attachment ){
22 $url = add_query_arg( array(
23 'w' => self::THUMB_SIZE,
24 'h' => self::THUMB_SIZE,
25 'crop' => 'true'
26 ), wp_get_attachment_url( $attachment->ID ) );
27
28 ?>
29
30 <img src="<?php echo esc_url( $url ); ?>" title="<?php echo esc_attr( $attachment->post_title ); ?>" alt="<?php echo esc_attr( $attachment->post_title ); ?>"
31 width="<?php echo self::THUMB_SIZE; ?>" height="<?php echo self::THUMB_SIZE; ?>" class="thumb" />
32 <?php } ?>
33 </div>
34
35 <div style="clear: both;"></div>
36 </div>
37
38 <p>
39 <a class="button gallery-widget-choose-images"><span class="wp-media-buttons-icon"></span> <?php esc_html_e( 'Choose Images', 'jetpack' ); ?></a>
40 </p>
41
42 <p class="gallery-widget-link-wrapper">
43 <label for="<?php echo $this->get_field_id( 'link' ); ?>"><?php esc_html_e( 'Link To:', 'jetpack' ); ?></label>
44 <select name="<?php echo $this->get_field_name( 'link' ); ?>" id="<?php echo $this->get_field_id( 'link' ); ?>" class="widefat">
45 <?php foreach ( $allowed_values['link'] as $key => $label ) {
46 $selected = '';
47
48 if ( $instance['link'] == $key ) {
49 $selected = "selected='selected' ";
50 } ?>
51
52 <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo esc_html( $label, 'jetpack' ); ?></option>
53 <?php } ?>
54 </select>
55 </p>
56
57 <p>
58 <label for="<?php echo $this->get_field_id( 'random' ); ?>"><?php esc_html_e( 'Random Order:', 'jetpack' ); ?></label>
59 <?php $checked = '';
60
61 if ( isset( $instance['random'] ) && $instance['random'] )
62 $checked = 'checked="checked"';
63
64 ?>
65 <input name="<?php echo $this->get_field_name( 'random' ); ?>" id="<?php echo $this->get_field_id( 'random' ); ?>" type="checkbox" <?php echo $checked; ?>>
66 </p>
67
68 <p class="gallery-widget-style-wrapper">
69 <label for="<?php echo $this->get_field_id( 'type' ); ?>"><?php esc_html_e( 'Style:', 'jetpack' ); ?></label>
70 <select name="<?php echo $this->get_field_name( 'type' ); ?>" id="<?php echo $this->get_field_id( 'type' ); ?>" class="widefat gallery-widget-style">
71 <?php foreach ( $allowed_values['type'] as $key => $label ) {
72 $selected = '';
73
74 if ( $instance['type'] == $key ) {
75 $selected = "selected='selected' ";
76 } ?>
77
78 <option value="<?php echo $key; ?>" <?php echo $selected; ?>><?php echo esc_html( $label, 'jetpack' ); ?></option>
79 <?php } ?>
80 </select>
81 </p>
82
83 <?php
84
85
86 ?>
87
88 <?php // Hidden input to hold the selected image ids as a csv list ?>
89 <input type="hidden" class="gallery-widget-ids" name="<?php echo $this->get_field_name( 'ids' ); ?>" id="<?php echo $this->get_field_id( 'ids' ); ?>" value="<?php echo esc_attr( $instance['ids'] ); ?>" />
90