This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixes control-hiding

  • Loading branch information...
dlanger committed Jan 24, 2012
1 parent 3333859 commit b0a0b6005f4668d4a5fb2fbda2e1905d4392353f
Showing with 34 additions and 25 deletions.
  1. +8 −1 readme.txt
  2. +26 −24 simpleslider.php
View
@@ -111,6 +111,10 @@ link decorations are all styled by the theme that's in use.
* Added auto-advancing slideshow support
* Controls are now their own CSS classes (thanks to ThomasBuxo)
+= 1.3 =
+* Sizing (image vs. DIV) bug fixed (thanks to kitchin)
+* Supports exclude filter to match Gallery shortcode and hiding of controls (thanks to robcolburn)
+
== Upgrade Notice ==
= 1.0 =
@@ -120,4 +124,7 @@ Initial upload to Wordpress.org.
This version allows the use of all Cycle translations. Adds support for internationalization. Upgrades the version of Cycle Lite used to properly hide non-displayed elements and their links.
= 1.2 =
-This version supports auto-advancing slideshows, as well as improved internals and more customizable CSS.
+This version supports auto-advancing slideshows, as well as improved internals and more customizable CSS.
+
+= 1.3 =
+In this version, the size of the containing div is much more accurate, removing problems some users had with too much whitespace. Support for excluding certain images, as well as hiding the controls, is added.
View
@@ -94,17 +94,18 @@ function sss_handle_shortcode( $attrs ) {
'image&post_parent=' . get_the_ID() .
'&orderby=menu_order&order=ASC' );
-
+ print_r(shortcode_atts( $defaults,
+ $attrs));
// Don't load anything or start processing if there are no
// images to display.
if( empty($images) )
return '';
- if( !empty($attrs['exclude']) ) {
- $exclude = explode(',', $attrs['exclude']);
- foreach ($exclude as $image_id) {
- unset($images[trim($image_id)]);
+ if( ! empty( $attrs[ 'exclude' ] ) ) {
+ $exclude = explode(',', $attrs[ 'exclude' ]);
+ foreach ( $exclude as $image_id ) {
+ unset( $images[ trim( $image_id ) ] );
}
}
@@ -152,29 +153,30 @@ function sss_handle_shortcode( $attrs ) {
}
$resp .= "</div>\n";
+
+ if ( true == $show_counter )
+ $image_counter = '<div class="simpleslider_counter"><span ' .
+ "id=\"{$slider_show_id}" .
+ '_count">1</span>/' . count($images) . '</div>';
+ else
+ $image_counter = '';
+
+ $resp .= '<div class="simpleslider_controls">';
- // Controls
- if ( true == $show_controls ) {
- $resp .= "\n".'<div class="simpleslider_controls">';
+ if ( true == $show_controls )
$resp .= "<a href=\"#\" id=\"{$slider_show_id}_prev\" " .
"title=\"Previous Image\" class=\"simpleslider_link prev\">◄ " .
- __( 'Prev.', 'simple_slideshow' ) . "</a> ";
-
- if ( true == $show_counter ) {
- $resp .= '&nbsp; <div class="simpleslider_counter"><span id="' .
- $slider_show_id . '_count">1</span>/' . count($images) . '</div>';
- }
-
- $resp .= "&nbsp; <a href=\"#\" id=\"{$slider_show_id}_next\" " .
- "title=\"Next Image\" class=\"simpleslider_link next\">" .
+ __( 'Prev.', 'simple_slideshow' ) . "</a> " .
+ "&nbsp;";
+
+ $resp .= ${image_counter};
+
+ if ( true == $show_controls)
+ $resp .= "&nbsp; <a href=\"#\" id=\"{$slider_show_id}_next\" " .
+ "title=\"Next Image\" class=\"simpleslider_link next\">" .
__( 'Next', 'simple_slideshow' ) . " ►</a>";
- $resp .= '</div>';
-
- } elseif ( true == $show_counter ) {
- $resp .= "\n".'<div class="simpleslider_counter"><span id="' .
- $slider_show_id . '_count">1</span>/' . count($images) .
- '</div>';
- }
+
+ $resp .= "</div>\n";
// JavaScript

0 comments on commit b0a0b60

Please sign in to comment.