Changeset 1216958
- Timestamp:
- 08/10/2015 09:02:26 AM (11 years ago)
- Location:
- easy-image-display/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
sb-easy-image-display.php (modified) (1 diff)
-
sb-easy-image-widget.php (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-image-display/trunk/readme.txt
r1202298 r1216958 3 3 Tags: image, gallery, latest image, random image 4 4 Requires at least: 3.5 5 Tested up to: 4. 2.25 Tested up to: 4.3 6 6 Donate link: http://patreon.com/shellbot 7 7 Stable tag: trunk … … 127 127 == Changelog == 128 128 129 = 1.2.4 = 130 * Compatibility with WP 4.3 131 129 132 = 1.2.3 = 130 133 * Fixed problem with caption links + lightbox … … 161 164 == Upgrade Notice == 162 165 166 = 1.2.4 = 167 * Fixes compatibility with upcoming WP 4.3 168 163 169 = 1.2.3 = 164 170 * Fixes problem with caption links + lightbox -
easy-image-display/trunk/sb-easy-image-display.php
r1202298 r1216958 4 4 Plugin URI: http://codebyshellbot.com/wordpress-plugins/easy-image-display/ 5 5 Description: An easy way to display random or latest images on your site. 6 Version: 1.2. 36 Version: 1.2.4 7 7 Author: Shellbot 8 8 Author URI: http://codebyshellbot.com -
easy-image-display/trunk/sb-easy-image-widget.php
r1193132 r1216958 2 2 /** 3 3 * Widget Name: Easy Image Display 4 * Version: 1.2. 34 * Version: 1.2.4 5 5 */ 6 6 … … 15 15 16 16 class SB_Easy_Image_Widget extends WP_Widget { 17 17 18 18 /* Widget setup --------------------------------------------------------- */ 19 20 function SB_Easy_Image_Widget() {21 22 $widget_ops = array( 23 'classname' => 'widget-sb-easy-image', 19 20 function __construct() { 21 22 $widget_ops = array( 23 'classname' => 'widget-sb-easy-image', 24 24 'description' => esc_html__('Arrange and display your uploaded images', 'shellbotics'), 25 25 ); 26 27 $control_ops = array( 28 'width' => 150, 29 'height' => 350, 26 27 $control_ops = array( 28 'width' => 150, 29 'height' => 350, 30 30 'id_base' => 'sb-easy-image-widget', 31 31 ); 32 32 33 $this->WP_Widget( 'sb-easy-image-widget', esc_html__( 'SB Easy Image', 'shellbotics' ), $widget_ops, $control_ops );34 } 35 36 33 parent::__construct( 'sb-easy-image-widget', esc_html__( 'SB Easy Image', 'shellbotics' ), $widget_ops, $control_ops ); 34 } 35 36 37 37 /* Update --------------------------------------------------------------- */ 38 38 39 39 function update( $new_instance, $old_instance ) { 40 40 $instance = $old_instance; … … 52 52 return $instance; 53 53 } 54 54 55 55 /* Return possible settings as array ---------------------------------------- */ 56 56 57 function sb_easy_image_params() { 57 function sb_easy_image_params() { 58 58 59 59 $params = array( … … 61 61 'Show all', 62 62 'Include only', 63 'Exclude', 64 ), 63 'Exclude', 64 ), 65 65 'yesno' => array( 66 66 'Yes', 67 'No', 68 ), 67 'No', 68 ), 69 69 'order' => array( 70 70 'Newest', … … 72 72 'Random', 73 73 'Custom', 74 ), 74 ), 75 75 'sizes' => array( 76 76 'Thumbnail', … … 78 78 'Large', 79 79 'Full', 80 ), 80 ), 81 81 'link' => array( 82 82 'None', … … 103 103 104 104 /* Settings ------------------------------------------------------------- */ 105 105 106 106 function form( $instance ) { 107 107 108 108 $params = $this->sb_easy_image_params(); 109 109 110 $defaults = array( 111 'title' => esc_html__( 'Latest Image', 'shellbotics' ), 110 $defaults = array( 111 'title' => esc_html__( 'Latest Image', 'shellbotics' ), 112 112 'order' => 'newest', 113 113 'size' => 'thumbnail', 114 'num' => 1, 114 'num' => 1, 115 115 'link' => 'File', 116 116 'url' => '', … … 121 121 ); 122 122 123 $instance = wp_parse_args( (array) $instance, $defaults ); 124 123 $instance = wp_parse_args( (array) $instance, $defaults ); 124 125 125 ?> 126 126 … … 129 129 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'shellbotics' ); ?></label> 130 130 <input id="<?php echo $this->get_field_id( 'title' ); ?>" type="text" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" class="widefat" /> 131 </p> 131 </p> 132 132 133 133 <!-- Number of images to display --> … … 135 135 <label for="<?php echo $this->get_field_id( 'num' ); ?>"><?php esc_html_e( 'Number of images to display', 'shellbotics' ); ?></label> 136 136 <input id="<?php echo $this->get_field_id( 'num' ); ?>" type="text" name="<?php echo $this->get_field_name( 'num' ); ?>" value="<?php echo $instance['num']; ?>" class="widefat" /> 137 </p> 137 </p> 138 138 139 139 <!-- Display order --> … … 148 148 </option> 149 149 <?php 150 } 150 } 151 151 ?> 152 152 </select> 153 153 </p> 154 154 155 155 <!-- Captions --> 156 156 <p> … … 164 164 </option> 165 165 <?php 166 } 166 } 167 167 ?> 168 168 </select> … … 184 184 </option> 185 185 <?php 186 } 186 } 187 187 ?> 188 188 </select> … … 200 200 </option> 201 201 <?php 202 } 202 } 203 203 ?> 204 204 </select> 205 205 </p> 206 206 207 207 <!-- Static URL --> 208 208 <p> 209 209 <label for="<?php echo $this->get_field_id( 'url' ); ?>"><?php esc_html_e( 'Static URL', 'shellbotics' ); ?></label> 210 210 <input id="<?php echo $this->get_field_id( 'url' ); ?>" type="text" name="<?php echo $this->get_field_name( 'url' ); ?>" value="<?php echo $instance['url']; ?>" class="widefat" /> 211 </p> 212 211 </p> 212 213 213 <!-- Number of columns to display --> 214 214 <p> 215 215 <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php esc_html_e( 'Number of columns to display', 'shellbotics' ); ?></label> 216 216 <input id="<?php echo $this->get_field_id( 'columns' ); ?>" type="text" name="<?php echo $this->get_field_name( 'columns' ); ?>" value="<?php echo $instance['columns']; ?>" class="widefat" /> 217 </p> 218 217 </p> 218 219 219 <!-- Filter --> 220 220 <p> … … 228 228 </option> 229 229 <?php 230 } 230 } 231 231 ?> 232 232 </select> 233 233 </p> 234 234 235 235 <!-- Image IDs --> 236 236 <p> 237 237 <label for="<?php echo $this->get_field_id( 'ids' ); ?>"><?php esc_html_e( 'Image IDs (separate with comma)', 'shellbotics' ); ?></label> 238 238 <input id="<?php echo $this->get_field_id( 'ids' ); ?>" type="text" name="<?php echo $this->get_field_name( 'ids' ); ?>" value="<?php echo $instance['ids']; ?>" class="widefat" /> 239 </p> 239 </p> 240 240 241 241 </div> … … 244 244 } 245 245 246 246 247 247 /* Display -------------------------------------------------------------- */ 248 248 249 249 function widget( $args, $instance ) { 250 250 … … 257 257 'order' => $instance['order'], 258 258 'size' => $instance['size'], 259 'link' => $instance['link'], 259 'link' => $instance['link'], 260 260 'url' => $instance['url'], 261 261 'columns' => $instance['columns'], … … 270 270 echo $before_title . $settings['title'] . $after_title; 271 271 } 272 272 273 273 global $sbcid; 274 274 echo $sbcid->sb_image_widget( $settings ); … … 276 276 echo $after_widget; 277 277 } 278 278 279 279 } // SB_Image_Widget class ends
Note: See TracChangeset
for help on using the changeset viewer.