Version Description
- Added: ARIA Profiles support for accessibility and screen readers
Download this release
Release Info
Developer | n7studios |
Plugin | Slider by Soliloquy – Responsive Image Slider for WordPress |
Version | 2.3.8 |
Comparing to | |
See all releases |
Code changes from version 2.3.7 to 2.3.8
- includes/admin/metaboxes.php +14 -0
- includes/global/common.php +33 -1
- includes/global/shortcode.php +11 -6
- readme.txt +3 -0
- soliloquy-lite.php +2 -2
includes/admin/metaboxes.php
CHANGED
@@ -742,6 +742,19 @@ class Soliloquy_Metaboxes_Lite {
|
|
742 |
<span class="description"><?php _e( 'Enables or disables image cropping based on slider dimensions <strong>(recommended)</strong>.', 'soliloquy' ); ?></span>
|
743 |
</td>
|
744 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
<?php do_action( 'soliloquy_config_box', $post ); ?>
|
746 |
</tbody>
|
747 |
</table>
|
@@ -876,6 +889,7 @@ class Soliloquy_Metaboxes_Lite {
|
|
876 |
$settings['config']['speed'] = absint( $_POST['_soliloquy']['speed'] );
|
877 |
$settings['config']['gutter'] = absint( $_POST['_soliloquy']['gutter'] );
|
878 |
$settings['config']['slider'] = isset( $_POST['_soliloquy']['slider'] ) ? 1 : 0;
|
|
|
879 |
$settings['config']['classes'] = explode( "\n", $_POST['_soliloquy']['classes'] );
|
880 |
$settings['config']['title'] = trim( strip_tags( $_POST['_soliloquy']['title'] ) );
|
881 |
$settings['config']['slug'] = sanitize_text_field( $_POST['_soliloquy']['slug'] );
|
742 |
<span class="description"><?php _e( 'Enables or disables image cropping based on slider dimensions <strong>(recommended)</strong>.', 'soliloquy' ); ?></span>
|
743 |
</td>
|
744 |
</tr>
|
745 |
+
<tr id="soliloquy-config-aria-live-box">
|
746 |
+
<th scope="row">
|
747 |
+
<label for="soliloquy-config-aria-live"><?php _e( 'ARIA Live Value', 'soliloquy' ); ?></label>
|
748 |
+
</th>
|
749 |
+
<td>
|
750 |
+
<select id="soliloquy-config-aria-live" name="_soliloquy[aria_live]">
|
751 |
+
<?php foreach ( (array) Soliloquy_Common_Lite::get_instance()->get_aria_live_values() as $i => $data ) : ?>
|
752 |
+
<option value="<?php echo $data['value']; ?>"<?php selected( $data['value'], $this->get_config( 'aria_live', $this->get_config_default( 'aria_live' ) ) ); ?>><?php echo $data['name']; ?></option>
|
753 |
+
<?php endforeach; ?>
|
754 |
+
</select>
|
755 |
+
<p class="description"><?php _e( 'Accessibility: Defines the priority with which screen readers should treat updates to this slider.', 'soliloquy' ); ?></p>
|
756 |
+
</td>
|
757 |
+
</tr>
|
758 |
<?php do_action( 'soliloquy_config_box', $post ); ?>
|
759 |
</tbody>
|
760 |
</table>
|
889 |
$settings['config']['speed'] = absint( $_POST['_soliloquy']['speed'] );
|
890 |
$settings['config']['gutter'] = absint( $_POST['_soliloquy']['gutter'] );
|
891 |
$settings['config']['slider'] = isset( $_POST['_soliloquy']['slider'] ) ? 1 : 0;
|
892 |
+
$settings['config']['aria_live'] = preg_replace( '#[^a-z0-9-_]#', '', $_POST['_soliloquy']['aria_live'] );
|
893 |
$settings['config']['classes'] = explode( "\n", $_POST['_soliloquy']['classes'] );
|
894 |
$settings['config']['title'] = trim( strip_tags( $_POST['_soliloquy']['title'] ) );
|
895 |
$settings['config']['slug'] = sanitize_text_field( $_POST['_soliloquy']['slug'] );
|
includes/global/common.php
CHANGED
@@ -94,6 +94,34 @@ class Soliloquy_Common_Lite {
|
|
94 |
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
/**
|
98 |
* Helper method for setting default config values.
|
99 |
*
|
@@ -113,7 +141,7 @@ class Soliloquy_Common_Lite {
|
|
113 |
$post_id = absint( $_POST['post_id'] );
|
114 |
} else {
|
115 |
$post_id = isset( $post->ID ) ? $post->ID : (int) $id;
|
116 |
-
}
|
117 |
|
118 |
// Prepare default values.
|
119 |
$defaults = $this->get_config_defaults( $post_id );
|
@@ -143,11 +171,15 @@ class Soliloquy_Common_Lite {
|
|
143 |
'speed' => 400,
|
144 |
'gutter' => 20,
|
145 |
'slider' => 1,
|
|
|
|
|
|
|
146 |
'classes' => array(),
|
147 |
'title' => '',
|
148 |
'slug' => '',
|
149 |
'rtl' => 0,
|
150 |
);
|
|
|
151 |
return apply_filters( 'soliloquy_defaults', $defaults, $post_id );
|
152 |
|
153 |
}
|
94 |
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* Helper method for retrieving aria-live priorities
|
99 |
+
*
|
100 |
+
* @since 2.3.8
|
101 |
+
*
|
102 |
+
* @return array Array of aria-live priorities
|
103 |
+
*/
|
104 |
+
public function get_aria_live_values() {
|
105 |
+
|
106 |
+
$values = array(
|
107 |
+
array(
|
108 |
+
'value' => 'off',
|
109 |
+
'name' => __( 'Off', 'soliloquy' )
|
110 |
+
),
|
111 |
+
array(
|
112 |
+
'value' => 'polite',
|
113 |
+
'name' => __( 'Polite', 'soliloquy' )
|
114 |
+
),
|
115 |
+
array(
|
116 |
+
'value' => 'assertive',
|
117 |
+
'name' => __( 'Assertive', 'soliloquy' )
|
118 |
+
),
|
119 |
+
);
|
120 |
+
|
121 |
+
return apply_filters( 'soliloquy_aria_live_values', $values );
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
/**
|
126 |
* Helper method for setting default config values.
|
127 |
*
|
141 |
$post_id = absint( $_POST['post_id'] );
|
142 |
} else {
|
143 |
$post_id = isset( $post->ID ) ? $post->ID : (int) $id;
|
144 |
+
}
|
145 |
|
146 |
// Prepare default values.
|
147 |
$defaults = $this->get_config_defaults( $post_id );
|
171 |
'speed' => 400,
|
172 |
'gutter' => 20,
|
173 |
'slider' => 1,
|
174 |
+
'aria_live' => 'polite',
|
175 |
+
|
176 |
+
// Misc
|
177 |
'classes' => array(),
|
178 |
'title' => '',
|
179 |
'slug' => '',
|
180 |
'rtl' => 0,
|
181 |
);
|
182 |
+
|
183 |
return apply_filters( 'soliloquy_defaults', $defaults, $post_id );
|
184 |
|
185 |
}
|
includes/global/shortcode.php
CHANGED
@@ -199,7 +199,7 @@ class Soliloquy_Shortcode_Lite {
|
|
199 |
$slider = apply_filters( 'soliloquy_output_start', $slider, $data );
|
200 |
|
201 |
// Build out the slider HTML.
|
202 |
-
$slider .= '<div id="soliloquy-container-' . sanitize_html_class( $data['id'] ) . '" class="' . $this->get_slider_classes( $data ) . '" style="max-width:' . $this->get_config( 'slider_width', $data ) . 'px;max-height:' . $this->get_config( 'slider_height', $data ) . 'px;' . apply_filters( 'soliloquy_output_container_style', '', $data ) . '"' . apply_filters( 'soliloquy_output_container_attr', '', $data ) . '>';
|
203 |
$slider .= '<ul id="soliloquy-' . sanitize_html_class( $data['id'] ) . '" class="soliloquy-slider soliloquy-slides soliloquy-wrap soliloquy-clear">';
|
204 |
$slider = apply_filters( 'soliloquy_output_before_container', $slider, $data );
|
205 |
|
@@ -213,7 +213,7 @@ class Soliloquy_Shortcode_Lite {
|
|
213 |
$item = apply_filters( 'soliloquy_output_item_data', $item, $id, $data, $i );
|
214 |
|
215 |
$slider = apply_filters( 'soliloquy_output_before_item', $slider, $id, $item, $data, $i );
|
216 |
-
$output = '<li class="' . $this->get_slider_item_classes( $item, $i, $data ) . '"' . apply_filters( 'soliloquy_output_item_attr', '', $id, $item, $data, $i ) . ' draggable="false" style="list-style:none">';
|
217 |
$output .= $this->get_slide( $id, $item, $data, $i );
|
218 |
$output .= '</li>';
|
219 |
$output = apply_filters( 'soliloquy_output_single_item', $output, $id, $item, $data, $i );
|
@@ -391,19 +391,24 @@ class Soliloquy_Shortcode_Lite {
|
|
391 |
stopText: '<?php echo apply_filters( 'soliloquy_stop_text', '', $data ); ?>',
|
392 |
<?php do_action( 'soliloquy_api_config_callback', $data ); ?>
|
393 |
onSliderLoad: function(currentIndex){
|
394 |
-
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-active-slide').removeClass('soliloquy-active-slide');
|
395 |
soliloquy_container_<?php echo $data['id']; ?>.css({'height':'auto','background-image':'none'});
|
396 |
if ( soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-slider li').size() > 1 ) {
|
397 |
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-controls').fadeTo(300, 1);
|
398 |
}
|
399 |
-
soliloquy_<?php echo $data['id']; ?>.find('.soliloquy-item:not(.soliloquy-clone):eq(' + currentIndex + ')').addClass('soliloquy-active-slide');
|
400 |
// Purge all cloned items of IDs to avoid duplicate ID issues.
|
401 |
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-clone').find('*').removeAttr('id');
|
|
|
|
|
|
|
|
|
|
|
402 |
<?php do_action( 'soliloquy_api_on_load', $data ); ?>
|
403 |
},
|
404 |
onSlideBefore: function(element, oldIndex, newIndex){
|
405 |
-
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-active-slide').removeClass('soliloquy-active-slide');
|
406 |
-
$(element).addClass('soliloquy-active-slide');
|
407 |
<?php do_action( 'soliloquy_api_before_transition', $data ); ?>
|
408 |
},
|
409 |
onSlideAfter: function(element, oldIndex, newIndex){
|
199 |
$slider = apply_filters( 'soliloquy_output_start', $slider, $data );
|
200 |
|
201 |
// Build out the slider HTML.
|
202 |
+
$slider .= '<div aria-live="' . $this->get_config( 'aria_live', $data ) . '" id="soliloquy-container-' . sanitize_html_class( $data['id'] ) . '" class="' . $this->get_slider_classes( $data ) . '" style="max-width:' . $this->get_config( 'slider_width', $data ) . 'px;max-height:' . $this->get_config( 'slider_height', $data ) . 'px;' . apply_filters( 'soliloquy_output_container_style', '', $data ) . '"' . apply_filters( 'soliloquy_output_container_attr', '', $data ) . '>';
|
203 |
$slider .= '<ul id="soliloquy-' . sanitize_html_class( $data['id'] ) . '" class="soliloquy-slider soliloquy-slides soliloquy-wrap soliloquy-clear">';
|
204 |
$slider = apply_filters( 'soliloquy_output_before_container', $slider, $data );
|
205 |
|
213 |
$item = apply_filters( 'soliloquy_output_item_data', $item, $id, $data, $i );
|
214 |
|
215 |
$slider = apply_filters( 'soliloquy_output_before_item', $slider, $id, $item, $data, $i );
|
216 |
+
$output = '<li aria-hidden="true" class="' . $this->get_slider_item_classes( $item, $i, $data ) . '"' . apply_filters( 'soliloquy_output_item_attr', '', $id, $item, $data, $i ) . ' draggable="false" style="list-style:none">';
|
217 |
$output .= $this->get_slide( $id, $item, $data, $i );
|
218 |
$output .= '</li>';
|
219 |
$output = apply_filters( 'soliloquy_output_single_item', $output, $id, $item, $data, $i );
|
391 |
stopText: '<?php echo apply_filters( 'soliloquy_stop_text', '', $data ); ?>',
|
392 |
<?php do_action( 'soliloquy_api_config_callback', $data ); ?>
|
393 |
onSliderLoad: function(currentIndex){
|
394 |
+
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-active-slide').removeClass('soliloquy-active-slide').attr('aria-hidden','true');
|
395 |
soliloquy_container_<?php echo $data['id']; ?>.css({'height':'auto','background-image':'none'});
|
396 |
if ( soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-slider li').size() > 1 ) {
|
397 |
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-controls').fadeTo(300, 1);
|
398 |
}
|
399 |
+
soliloquy_<?php echo $data['id']; ?>.find('.soliloquy-item:not(.soliloquy-clone):eq(' + currentIndex + ')').addClass('soliloquy-active-slide').attr('aria-hidden','false');
|
400 |
// Purge all cloned items of IDs to avoid duplicate ID issues.
|
401 |
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-clone').find('*').removeAttr('id');
|
402 |
+
|
403 |
+
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-controls-direction').attr('aria-label','carousel buttons').attr('aria-controls', '<?php echo 'soliloquy-container-' . $data['id']; ?>');
|
404 |
+
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-controls-direction a.soliloquy-prev').attr('aria-label','previous');
|
405 |
+
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-controls-direction a.soliloquy-next').attr('aria-label','next');
|
406 |
+
|
407 |
<?php do_action( 'soliloquy_api_on_load', $data ); ?>
|
408 |
},
|
409 |
onSlideBefore: function(element, oldIndex, newIndex){
|
410 |
+
soliloquy_container_<?php echo $data['id']; ?>.find('.soliloquy-active-slide').removeClass('soliloquy-active-slide').attr('aria-hidden','true');
|
411 |
+
$(element).addClass('soliloquy-active-slide').attr('aria-hidden','false');
|
412 |
<?php do_action( 'soliloquy_api_before_transition', $data ); ?>
|
413 |
},
|
414 |
onSlideAfter: function(element, oldIndex, newIndex){
|
readme.txt
CHANGED
@@ -87,6 +87,9 @@ Soliloquy has many Addons that extend its default functionality to make it do in
|
|
87 |
|
88 |
== Changelog ==
|
89 |
|
|
|
|
|
|
|
90 |
= 2.3.7 =
|
91 |
* Fix: Force slider ID on save, to ensure compat with WPML and duplication plugins
|
92 |
|
87 |
|
88 |
== Changelog ==
|
89 |
|
90 |
+
= 2.3.8 =
|
91 |
+
* Added: ARIA Profiles support for accessibility and screen readers
|
92 |
+
|
93 |
= 2.3.7 =
|
94 |
* Fix: Force slider ID on save, to ensure compat with WPML and duplication plugins
|
95 |
|
soliloquy-lite.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
|
6 |
* Author: Thomas Griffin
|
7 |
* Author URI: http://thomasgriffinmedia.com
|
8 |
-
* Version: 2.3.
|
9 |
* Text Domain: soliloquy
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -54,7 +54,7 @@ class Soliloquy_Lite {
|
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
-
public $version = '2.3.
|
58 |
|
59 |
/**
|
60 |
* The name of the plugin.
|
5 |
* Description: Soliloquy is best responsive WordPress slider plugin. This is the lite version.
|
6 |
* Author: Thomas Griffin
|
7 |
* Author URI: http://thomasgriffinmedia.com
|
8 |
+
* Version: 2.3.8
|
9 |
* Text Domain: soliloquy
|
10 |
* Domain Path: languages
|
11 |
*
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
+
public $version = '2.3.8';
|
58 |
|
59 |
/**
|
60 |
* The name of the plugin.
|