Skip to content

Commit 4f2f9a7

Browse files
committed
Added option to toggle options on gallery modal, fixes #19
1 parent feacf58 commit 4f2f9a7

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

inc/options.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,14 @@ public static function defaultOptions() {
349349
public static function defaults() {
350350

351351
return array(
352+
'showOnGalleryModal' => array(
353+
'name' => __( 'Show options on gallery modal', 'slick-slider' ),
354+
'desc' => __( 'Show Slick Slider options on single gallery modal', 'slick-slider' ),
355+
'showOnSingleGallery' => false,
356+
'setting' => 'showOnGalleryModal',
357+
'type' => 'boolean',
358+
'value' => true,
359+
),
352360
'accessibility' => array(
353361
'name' => __( 'accessibility', 'slick-slider' ),
354362
'desc' => __( 'Enables tabbing and arrow key navigation.', 'slick-slider' ),

inc/template.class.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public static function initTemplate() {
4141
*/
4242
public static function printMediaTemplates() {
4343

44-
$pagenow = slickSliderMain::currentPage(); ?>
44+
$pagenow = slickSliderMain::currentPage();
45+
$showOnGalleryModal = slickSliderOptions::get( 'showOnGalleryModal' )['value'];
46+
?>
4547

4648
<script type="text/html" id="tmpl-slick-slider-gallery-settings">
4749
<div class="clear"></div>
@@ -54,9 +56,11 @@ public static function printMediaTemplates() {
5456
<input type="checkbox" data-setting="slick_active">
5557
</label>
5658
</div>
57-
<div class="slick-slider-settings-inner">
58-
<?php slickSliderOptions::renderSettingsMarkup( $pagenow ); ?>
59-
</div>
59+
<?php if ( $showOnGalleryModal ) { ?>
60+
<div class="slick-slider-settings-inner">
61+
<?php slickSliderOptions::renderSettingsMarkup( $pagenow ); ?>
62+
</div>
63+
<?php } ?>
6064
</div>
6165
</script>
6266

readme.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ If you want, you can buy me a beer too. You’ll find the donation link on your
114114

115115
== Changelog ==
116116

117-
= 0.2 (10/17/2016) =
117+
= 0.2 (10/23/2016) =
118+
* Feature: Added option to toggle Slick Slider options on gallery modal
118119
* Fix: Minor tweaks in readme.txt
119-
* Fix: Minor bug causing default values to be rendered in `data-slick` attribute
120+
* Fix: Minor bug causing some default values to be rendered in `data-slick` attribute
120121
* Fix: Minor bug that prevented new options to be added
121122
* Fix: Minor bug that caused wrapper div to be included in caption filter
122123
* Fix: Normalized gallery modal CSS

0 commit comments

Comments
 (0)