Changeset 1018335
- Timestamp:
- 11/02/2014 12:53:56 PM (11 years ago)
- Location:
- easy-image-display/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
sb-easy-image-display.php (modified) (11 diffs)
-
sb-easy-image-widget.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-image-display/trunk/readme.txt
r994143 r1018335 20 20 Current features include: 21 21 22 * Show or hide image captions 22 23 * Newest, oldest, random and custom sorting options 23 24 * Include/exclude images based on ID … … 124 125 == Changelog == 125 126 127 = 1.2.2 = 128 * Added option to show/hide captions 129 126 130 = 1.2.1 = 127 131 * Fixed incompatibility with other plugins affecting the [gallery] shortcode … … 152 156 == Upgrade Notice == 153 157 158 = 1.2.2 = 159 * New feature! Show/hide image captions. 160 154 161 = 1.2.1 = 155 162 * Fixes incompatibility with other plugins affecting the [gallery] shortcode -
easy-image-display/trunk/sb-easy-image-display.php
r994142 r1018335 4 4 Plugin URI: http://shellbotics.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. 16 Version: 1.2.2 7 7 Author: Shellbot 8 8 Author URI: http://shellbotics.com … … 66 66 }); 67 67 </script>'; 68 } 69 70 function public_css( $gallery_id = '' ) { 71 echo '<style type="text/css">' 72 . '#' . $gallery_id . ' .gallery-caption { display: none !important; }' 73 . '</style>'; 68 74 } 69 75 … … 86 92 'filter' => 'only', 87 93 'ids' => '', 94 'captions' => 'on', 88 95 ), $args ) ); 89 96 … … 98 105 'filter' => $filter, 99 106 'ids' => $ids, 107 'captions' => $captions, 100 108 ); 101 109 … … 117 125 'filter' => 'only', 118 126 'ids' => '', 127 'captions' => 'on', 119 128 ), $args ) ); 120 129 … … 129 138 'filter' => $filter, 130 139 'ids' => $ids, 140 'captions' => $captions, 131 141 ); 132 142 … … 148 158 'filter' => 'only', 149 159 'ids' => '', 160 'captions' => 'on', 150 161 ), $args ) ); 151 162 … … 160 171 'filter' => $filter, 161 172 'ids' => $ids, 173 'captions' => $captions, 162 174 ); 163 175 … … 168 180 /* Construct query and return array of images ------------------------------- */ 169 181 170 function sb_get_easy_image( $args, $src = '' ) { 171 182 function sb_get_easy_image( $args, $src = '' ) { 183 172 184 $query = array ( 173 185 'post_type' => 'attachment', … … 243 255 $ids .= $attachment->ID . ', '; 244 256 } 245 return do_shortcode( '[sb_gallery columns="' . $args['columns'] . '" ids="' . $ids . '" size="' . strtolower( $args['size'] ) . '" link="' . strtolower( $args['link'] ) . '" url="' . strtolower( $args['url'] ) . '"]' ); 257 258 return do_shortcode( '[sb_gallery columns="' . $args['columns'] . '" ids="' . $ids . '" size="' . strtolower( $args['size'] ) . '" link="' . strtolower( $args['link'] ) . '" url="' . strtolower( $args['url'] ) . ' captions="' . strtolower( $args['captions'] ) . '"]' ); 246 259 247 260 } else { … … 355 368 $this->public_js( $gallery_id ); 356 369 } 370 371 if( strtolower( $attr['captions'] ) == 'off' ) { 372 $this->public_css( $gallery_id ); 373 } 357 374 358 375 return $output; -
easy-image-display/trunk/sb-easy-image-widget.php
r994142 r1018335 2 2 /** 3 3 * Widget Name: Easy Image Display 4 * Version: 1.2. 14 * Version: 1.2.2 5 5 */ 6 6 … … 48 48 $instance['filter'] = $new_instance['filter']; 49 49 $instance['ids'] = $new_instance['ids']; 50 $instance['captions'] = $new_instance['captions']; 50 51 51 52 return $instance; … … 90 91 'Exclude', 91 92 ), 93 'captions' => array( 94 'On', 95 'Off', 96 ), 92 97 ); 93 98 … … 113 118 'filter' => 'Only', 114 119 'ids' => '', 120 'captions' => 'on', 115 121 ); 116 122 … … 140 146 <option value="<?php echo $order; ?>" <?php if ( $order == $instance['order'] ) { echo 'selected="selected"'; } ?>> 141 147 <?php echo $order; ?> 148 </option> 149 <?php 150 } 151 ?> 152 </select> 153 </p> 154 155 <!-- Captions --> 156 <p> 157 <label for="<?php echo $this->get_field_id( 'captions' ); ?>"><?php esc_html_e( 'Captions:', 'shellbotics' ); ?></label> 158 <select id="<?php echo $this->get_field_id( 'captions' ); ?>" name="<?php echo $this->get_field_name( 'captions' ); ?>" > 159 <?php 160 foreach ( $params['captions'] as $caption ) { 161 ?> 162 <option value="<?php echo $caption; ?>" <?php if ( $caption == $instance['captions'] ) { echo 'selected="selected"'; } ?>> 163 <?php echo $caption; ?> 142 164 </option> 143 165 <?php … … 240 262 'filter' => $instance['filter'], 241 263 'ids' => $instance['ids'], 264 'captions'=> $instance['captions'], 242 265 ); 243 266
Note: See TracChangeset
for help on using the changeset viewer.