Slideshow - Version 2.1.6

Version Description

  • Slideshow widgets are loaded using theme sidebar settings, making the widget more dynamic.
  • Fixed slideshow widget title can now be set to an empty value.
Download this release

Release Info

Developer stefanboonstra
Plugin Icon 128x128 Slideshow
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

classes/SlideshowPlugin.php CHANGED
@@ -3,9 +3,9 @@
3
  * Class SlideslowPlugin is called whenever a slideshow do_action tag is come across.
4
  * Responsible for outputting the slideshow's HTML, CSS and Javascript.
5
  *
6
- * TODO Create a variable in which all slideshow html can be stored
7
  * @author: Stefan Boonstra
8
- * @version: 15-09-12
9
  */
10
  class SlideshowPlugin {
11
 
@@ -87,15 +87,25 @@ class SlideshowPlugin {
87
  SlideshowPluginMain::getPluginUrl() . '/style/' . __CLASS__ . '/functional.css'
88
  );
89
 
90
- // Enqueue stylesheet for appearance
91
- $printStyle = '';
92
- if($allSettings['style_style'] == 'custom' && isset($allSettings['style_custom']) && !empty($allSettings['style_custom'])) // Custom style
93
- $printStyle = str_replace('%plugin-url%', SlideshowPluginMain::getPluginUrl(), $allSettings['style_custom']);
94
- else // Enqueue stylesheet
95
- wp_enqueue_style(
96
- 'slideshow_style',
97
- SlideshowPluginMain::getPluginUrl() . '/style/' . __CLASS__ . '/style-' . $allSettings['style_style'] . '.css'
98
- );
 
 
 
 
 
 
 
 
 
 
99
 
100
  // Filter settings to only contain settings, then remove prefix
101
  $settings = array();
@@ -103,9 +113,6 @@ class SlideshowPlugin {
103
  if(SlideshowPluginPostType::$prefixes['settings'] == substr($key, 0, strlen(SlideshowPluginPostType::$prefixes['settings'])))
104
  $settings[substr($key, strlen(SlideshowPluginPostType::$prefixes['settings']))] = $value;
105
 
106
- // Create a microtime timestamp to host multiple slideshows on a page
107
- $id = rand();
108
-
109
  // Include output file that stores output in $output.
110
  $output = '';
111
  ob_start();
3
  * Class SlideslowPlugin is called whenever a slideshow do_action tag is come across.
4
  * Responsible for outputting the slideshow's HTML, CSS and Javascript.
5
  *
6
+ * TODO Create a variable in which all slideshow html can be stored <- Rethink this, slideshow containers have random ids.
7
  * @author: Stefan Boonstra
8
+ * @version: 22-09-12
9
  */
10
  class SlideshowPlugin {
11
 
87
  SlideshowPluginMain::getPluginUrl() . '/style/' . __CLASS__ . '/functional.css'
88
  );
89
 
90
+ // Create a microtime timestamp to host multiple slideshows with different styles and settings on the same page
91
+ $randomId = rand();
92
+
93
+ // Get stylesheet for printing
94
+ $style = '';
95
+ if($allSettings['style_style'] == 'custom' && isset($allSettings['style_custom']) && !empty($allSettings['style_custom'])){ // Custom style
96
+ $style = str_replace('%plugin-url%', SlideshowPluginMain::getPluginUrl(), $allSettings['style_custom']);
97
+ }else{ // Set style
98
+ $filePath = SlideshowPluginMain::getPluginPath() . '/style/' . __CLASS__ . '/style-' . $allSettings['style_style'] . '.css';
99
+ if(file_exists(SlideshowPluginMain::getPluginPath() . '/style/' . __CLASS__ . '/style-' . $allSettings['style_style'] . '.css')){
100
+ ob_start();
101
+ include($filePath);
102
+ $style = str_replace('%plugin-url%', SlideshowPluginMain::getPluginUrl(), ob_get_clean());
103
+ }
104
+ }
105
+
106
+ // Append the random ID to the slideshow container in the stylesheet, to identify multiple slideshows
107
+ if(!empty($style))
108
+ $style = str_replace('.slideshow_container', '.slideshow_container_' . $randomId, $style);
109
 
110
  // Filter settings to only contain settings, then remove prefix
111
  $settings = array();
113
  if(SlideshowPluginPostType::$prefixes['settings'] == substr($key, 0, strlen(SlideshowPluginPostType::$prefixes['settings'])))
114
  $settings[substr($key, strlen(SlideshowPluginPostType::$prefixes['settings']))] = $value;
115
 
 
 
 
116
  // Include output file that stores output in $output.
117
  $output = '';
118
  ob_start();
classes/SlideshowPluginPostType.php CHANGED
@@ -4,7 +4,7 @@
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
- * @version: 15-09-12
8
  */
9
  class SlideshowPluginPostType {
10
 
@@ -374,7 +374,8 @@ class SlideshowPluginPostType {
374
  'setting_controlPanel' => 'false',
375
  'setting_showDescription' => 'true',
376
  'setting_hideDescription' => 'true',
377
- 'setting_random' => 'false'
 
378
  );
379
 
380
  if($fullDefinition){
@@ -398,7 +399,8 @@ class SlideshowPluginPostType {
398
  'setting_loop' => array('radio', '', $data['setting_loop'], __('Return to the beginning of the slideshow after last slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
399
  'setting_controllable' => array('radio', '', $data['setting_controllable'], __('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
400
  'setting_controlPanel' => array('radio', '', $data['setting_controlPanel'], __('Show control panel (play and pause button)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
401
- 'setting_random' => array('radio', '', $data['setting_random'], __('Randomize slides', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Miscellaneous', 'slideshow-plugin'))
 
402
  );
403
  }
404
 
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 23-09-12
8
  */
9
  class SlideshowPluginPostType {
10
 
374
  'setting_controlPanel' => 'false',
375
  'setting_showDescription' => 'true',
376
  'setting_hideDescription' => 'true',
377
+ 'setting_random' => 'false',
378
+ //'setting_cssInHeader' => 'false'
379
  );
380
 
381
  if($fullDefinition){
399
  'setting_loop' => array('radio', '', $data['setting_loop'], __('Return to the beginning of the slideshow after last slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
400
  'setting_controllable' => array('radio', '', $data['setting_controllable'], __('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
401
  'setting_controlPanel' => array('radio', '', $data['setting_controlPanel'], __('Show control panel (play and pause button)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
402
+ 'setting_random' => array('radio', '', $data['setting_random'], __('Randomize slides', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Miscellaneous', 'slideshow-plugin')),
403
+ //'setting_cssInHeader' => array('radio', '', $data['setting_cssInHeader'], __('Load all CSS in the \'&lt;head&gt;\' area', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Miscellaneous', 'slideshow-plugin'))
404
  );
405
  }
406
 
classes/SlideshowPluginShortcode.php CHANGED
@@ -3,7 +3,7 @@
3
  * Class SlideshowPluginShortcode is called on use of shortcode anywhere on the website.
4
  *
5
  * @author: Stefan Boonstra
6
- * @version: 15-09-12
7
  */
8
  class SlideshowPluginShortcode {
9
 
3
  * Class SlideshowPluginShortcode is called on use of shortcode anywhere on the website.
4
  *
5
  * @author: Stefan Boonstra
6
+ * @version: 21-09-12
7
  */
8
  class SlideshowPluginShortcode {
9
 
classes/SlideshowPluginWidget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Class SlideshowPluginWidget allows showing one of your slideshows in your widget area.
4
  *
5
  * @author: Stefan Boonstra
6
- * @version: 15-09-12
7
  */
8
  class SlideshowPluginWidget extends WP_Widget {
9
 
@@ -41,15 +41,28 @@ class SlideshowPluginWidget extends WP_Widget {
41
  $slideshowId = $instance['slideshowId'];
42
 
43
  // Get title
44
- $title = self::$widgetName;
45
  if(isset($instance['title']))
46
  $title = $instance['title'];
47
 
48
  // Prepare slideshow for output to website.
49
  $output = SlideshowPlugin::prepare($slideshowId);
50
 
51
- // Include widget html
52
- include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/widget.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
 
55
  /**
@@ -86,7 +99,7 @@ class SlideshowPluginWidget extends WP_Widget {
86
  */
87
  function update($newInstance, $instance){
88
  // Update title
89
- if(isset($newInstance['title']) && !empty($newInstance['title']))
90
  $instance['title'] = $newInstance['title'];
91
 
92
  // Update slideshowId
3
  * Class SlideshowPluginWidget allows showing one of your slideshows in your widget area.
4
  *
5
  * @author: Stefan Boonstra
6
+ * @version: 23-09-12
7
  */
8
  class SlideshowPluginWidget extends WP_Widget {
9
 
41
  $slideshowId = $instance['slideshowId'];
42
 
43
  // Get title
44
+ $title = '';
45
  if(isset($instance['title']))
46
  $title = $instance['title'];
47
 
48
  // Prepare slideshow for output to website.
49
  $output = SlideshowPlugin::prepare($slideshowId);
50
 
51
+ $beforeWidget = $afterWidget = $beforeTitle = $afterTitle = '';
52
+ if(isset($args['before_widget']))
53
+ $beforeWidget = $args['before_widget'];
54
+ if(isset($args['after_widget']))
55
+ $afterWidget = $args['after_widget'];
56
+ if(isset($args['before_title']))
57
+ $beforeTitle = $args['before_title'];
58
+ if(isset($args['after_title']))
59
+ $afterTitle = $args['after_title'];
60
+
61
+ // Output widget
62
+ echo $beforeWidget .
63
+ $beforeTitle . $title . $afterTitle .
64
+ $output .
65
+ $afterWidget;
66
  }
67
 
68
  /**
99
  */
100
  function update($newInstance, $instance){
101
  // Update title
102
+ if(isset($newInstance['title']))
103
  $instance['title'] = $newInstance['title'];
104
 
105
  // Update slideshowId
languages/slideshow-plugin-nl_NL.mo CHANGED
Binary file
languages/slideshow-plugin-nl_NL.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Slideshow Plugin\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-09-15 17:46+0100\n"
6
- "PO-Revision-Date: 2012-09-15 17:47+0100\n"
7
  "Last-Translator: Stefan Boonstra <stefanboonstra@hotmail.com>\n"
8
  "Language-Team: Stefan Boonstra <wordpress@stefanboonstra.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -89,9 +89,8 @@ msgid "Custom"
89
  msgstr "Aangepast"
90
 
91
  #: classes/SlideshowPluginPostType.php:385
92
- #, fuzzy
93
  msgid "Custom style editor"
94
- msgstr "Aangepaste Stijl Bewerker"
95
 
96
  #: classes/SlideshowPluginPostType.php:386
97
  msgid "Animation used for transition between slides"
@@ -221,6 +220,11 @@ msgstr "Om deze slideshow op je website te gebruiken voeg je of dit stukje short
221
  msgid "Or add this piece of code to where ever in your website you want to place the slideshow"
222
  msgstr "Of je voegt dit stuk code toe aan je broncode op de plaats waar je wilt dat de slideshow te zien is"
223
 
 
 
 
 
 
224
  #: views/SlideshowPluginPostType/settings.php:8
225
  msgid "settings"
226
  msgstr "instellingen"
2
  msgstr ""
3
  "Project-Id-Version: Slideshow Plugin\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-09-22 19:22+0100\n"
6
+ "PO-Revision-Date: 2012-09-22 19:24+0100\n"
7
  "Last-Translator: Stefan Boonstra <stefanboonstra@hotmail.com>\n"
8
  "Language-Team: Stefan Boonstra <wordpress@stefanboonstra.com>\n"
9
  "MIME-Version: 1.0\n"
89
  msgstr "Aangepast"
90
 
91
  #: classes/SlideshowPluginPostType.php:385
 
92
  msgid "Custom style editor"
93
+ msgstr "Aangepaste stijl bewerker"
94
 
95
  #: classes/SlideshowPluginPostType.php:386
96
  msgid "Animation used for transition between slides"
220
  msgid "Or add this piece of code to where ever in your website you want to place the slideshow"
221
  msgstr "Of je voegt dit stuk code toe aan je broncode op de plaats waar je wilt dat de slideshow te zien is"
222
 
223
+ #: views/SlideshowPluginPostType/information.php:5
224
+ #, php-format
225
+ msgid "Or go to the %swidgets page%s and show the slideshow as a widget."
226
+ msgstr "Ook kan je naar de %swidget pagina%s toegaan, om de slideshow te tonen als widget."
227
+
228
  #: views/SlideshowPluginPostType/settings.php:8
229
  msgid "settings"
230
  msgstr "instellingen"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: stefanboonstra
4
  Tags: slideshow, slider, slide, show, images, image, photo, gallery, galleries, jquery, javascript,
5
  Requires at least: 3.3
6
  Tested up to: 3.4.2
7
- Stable tag: 2.1.5
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
@@ -98,6 +98,11 @@ slideshow may not be styled.
98
 
99
  = 2.2.0 Pre-release =
100
  * Slides can now be randomized.
 
 
 
 
 
101
 
102
  = 2.1.5 =
103
  * Fixed: Wordpress intervened with the HTML output by the shortcode, this caused scripts to break.
4
  Tags: slideshow, slider, slide, show, images, image, photo, gallery, galleries, jquery, javascript,
5
  Requires at least: 3.3
6
  Tested up to: 3.4.2
7
+ Stable tag: 2.1.6
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
98
 
99
  = 2.2.0 Pre-release =
100
  * Slides can now be randomized.
101
+ * Multiple slideshows can now be shown with each its separate styling.
102
+
103
+ = 2.1.6 =
104
+ * Slideshow widgets are loaded using theme sidebar settings, making the widget more dynamic.
105
+ * Fixed slideshow widget title can now be set to an empty value.
106
 
107
  = 2.1.5 =
108
  * Fixed: Wordpress intervened with the HTML output by the shortcode, this caused scripts to break.
slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
- Version: 2.1.5
7
  Requires at least: 3.3
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
@@ -16,12 +16,12 @@
16
  * base path/url returning method.
17
  *
18
  * @author Stefan Boonstra
19
- * @version 16-09-12
20
  */
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
- static $version = '2.1.5';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
+ Version: 2.1.6
7
  Requires at least: 3.3
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
16
  * base path/url returning method.
17
  *
18
  * @author Stefan Boonstra
19
+ * @version 23-09-12
20
  */
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
+ static $version = '2.1.6';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
style/SlideshowPlugin/style-dark.css CHANGED
@@ -40,18 +40,18 @@
40
  .slideshow_container .controlPanel ul li:hover { }
41
 
42
  .slideshow_container .play {
43
- background: url('../../images/SlideshowPlugin/dark-controlpanel.png') 0 0 no-repeat;
44
  }
45
 
46
  .slideshow_container .pause {
47
- background: url('../../images/SlideshowPlugin/dark-controlpanel.png') -20px 0 no-repeat;
48
  }
49
 
50
  .slideshow_container .button {
51
  margin-top: -50px;
52
  height: 100px;
53
  width: 24px;
54
- background: url('../../images/SlideshowPlugin/dark-arrows.png') no-repeat;
55
  }
56
 
57
  .slideshow_container .previous { }
40
  .slideshow_container .controlPanel ul li:hover { }
41
 
42
  .slideshow_container .play {
43
+ background: url('%plugin-url%/images/SlideshowPlugin/dark-controlpanel.png') 0 0 no-repeat;
44
  }
45
 
46
  .slideshow_container .pause {
47
+ background: url('%plugin-url%/images/SlideshowPlugin/dark-controlpanel.png') -20px 0 no-repeat;
48
  }
49
 
50
  .slideshow_container .button {
51
  margin-top: -50px;
52
  height: 100px;
53
  width: 24px;
54
+ background: url('%plugin-url%/images/SlideshowPlugin/dark-arrows.png') no-repeat;
55
  }
56
 
57
  .slideshow_container .previous { }
style/SlideshowPlugin/style-light.css CHANGED
@@ -41,18 +41,18 @@
41
  .slideshow_container .controlPanel ul li:hover { }
42
 
43
  .slideshow_container .play {
44
- background: url('../../images/SlideshowPlugin/light-controlpanel.png') 0 0 no-repeat;
45
  }
46
 
47
  .slideshow_container .pause {
48
- background: url('../../images/SlideshowPlugin/light-controlpanel.png') -15px 0 no-repeat;
49
  }
50
 
51
  .slideshow_container .button {
52
  margin-top: -20px;
53
  height: 40px;
54
  width: 19px;
55
- background: url('../../images/SlideshowPlugin/light-arrows.png') no-repeat;
56
  }
57
 
58
  .slideshow_container .previous { }
41
  .slideshow_container .controlPanel ul li:hover { }
42
 
43
  .slideshow_container .play {
44
+ background: url('%plugin-url%/images/SlideshowPlugin/light-controlpanel.png') 0 0 no-repeat;
45
  }
46
 
47
  .slideshow_container .pause {
48
+ background: url('%plugin-url%/images/SlideshowPlugin/light-controlpanel.png') -15px 0 no-repeat;
49
  }
50
 
51
  .slideshow_container .button {
52
  margin-top: -20px;
53
  height: 40px;
54
  width: 19px;
55
+ background: url('%plugin-url%/images/SlideshowPlugin/light-arrows.png') no-repeat;
56
  }
57
 
58
  .slideshow_container .previous { }
views/SlideshowPlugin/slideshow.php CHANGED
@@ -1,4 +1,4 @@
1
- <div class="slideshow_container slideshow_id_<?php echo $id; ?>" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
2
  <div class="slideshow_overflow" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
3
  <div class="slideshow">
4
  <?php if(count($slides) > 0): ?>
@@ -61,7 +61,15 @@
61
  continue;
62
 
63
  $image = wp_get_attachment_image_src($attachment->ID, 'full');
64
- if(!is_array($image) || !$image) continue;
 
 
 
 
 
 
 
 
65
  ?>
66
 
67
  <div class="slide slide_<?php echo $i; ?>" style="height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
@@ -73,7 +81,7 @@
73
  </div>
74
  <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
75
  <img
76
- src="<?php echo $image[0]; ?>"
77
  alt="<?php echo $attachment->post_title; ?>"
78
  />
79
  </a>
@@ -105,13 +113,13 @@
105
 
106
  <script type="text/javascript">
107
  jQuery(document).ready(function(){
108
- jQuery('.slideshow_id_<?php echo $id; ?>').slideshow_script();
109
  });
110
  </script>
111
 
112
- <?php if(!empty($printStyle)): ?>
113
  <style type="text/css">
114
- <?php echo $printStyle; ?>
115
  </style>
116
  <?php endif; ?>
117
  </div>
1
+ <div class="slideshow_container slideshow_container_<?php echo $randomId; ?>" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
2
  <div class="slideshow_overflow" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
3
  <div class="slideshow">
4
  <?php if(count($slides) > 0): ?>
61
  continue;
62
 
63
  $image = wp_get_attachment_image_src($attachment->ID, 'full');
64
+ $imageSrc = '';
65
+ if(!is_array($image) || !$image){
66
+ if(!empty($attachment->guid))
67
+ $imageSrc = $attachment->guid;
68
+ else
69
+ continue;
70
+ }else{
71
+ $imageSrc = $image[0];
72
+ }
73
  ?>
74
 
75
  <div class="slide slide_<?php echo $i; ?>" style="height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
81
  </div>
82
  <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
83
  <img
84
+ src="<?php echo $imageSrc; ?>"
85
  alt="<?php echo $attachment->post_title; ?>"
86
  />
87
  </a>
113
 
114
  <script type="text/javascript">
115
  jQuery(document).ready(function(){
116
+ jQuery('.slideshow_container_<?php echo $randomId; ?>').slideshow_script();
117
  });
118
  </script>
119
 
120
+ <?php if(!empty($style)): ?>
121
  <style type="text/css">
122
+ <?php echo $style; ?>
123
  </style>
124
  <?php endif; ?>
125
  </div>
views/SlideshowPluginPostType/information.php CHANGED
@@ -1,4 +1,5 @@
1
  <p><?php _e('To use this slideshow in your website either add this piece of shortcode to your posts or pages', 'slideshow-plugin'); ?>:</p>
2
- <p><i><?php echo $shortCode; ?><i></p>
3
  <p><?php _e('Or add this piece of code to where ever in your website you want to place the slideshow', 'slideshow-plugin'); ?>:</p>
4
- <p><i><?php echo $snippet; ?></i></p>
 
1
  <p><?php _e('To use this slideshow in your website either add this piece of shortcode to your posts or pages', 'slideshow-plugin'); ?>:</p>
2
+ <p><i><?php echo $shortCode; ?></i></p>
3
  <p><?php _e('Or add this piece of code to where ever in your website you want to place the slideshow', 'slideshow-plugin'); ?>:</p>
4
+ <p><i><?php echo $snippet; ?></i></p>
5
+ <p><?php echo sprintf(__('Or go to the %swidgets page%s and show the slideshow as a widget.', 'slideshow-plugin'), '<a href="' . get_admin_url(null, 'widgets.php') . '" target="_blank">', '</a>'); ?></p>
views/SlideshowPluginPostType/settings.php CHANGED
@@ -1,6 +1,8 @@
1
  <table>
2
  <?php $groups = array(); ?>
3
  <?php foreach($settings as $key => $value): ?>
 
 
4
  <?php if(!empty($value['group']) && !isset($groups[$value['group']])): $groups[$value['group']] = true; ?>
5
  <tr>
6
  <td colspan="3" style="border-bottom: 1px solid #dfdfdf; text-align: center;">
1
  <table>
2
  <?php $groups = array(); ?>
3
  <?php foreach($settings as $key => $value): ?>
4
+ <?php if(!isset($value) || !is_array($value)) continue; ?>
5
+
6
  <?php if(!empty($value['group']) && !isset($groups[$value['group']])): $groups[$value['group']] = true; ?>
7
  <tr>
8
  <td colspan="3" style="border-bottom: 1px solid #dfdfdf; text-align: center;">
views/SlideshowPluginWidget/widget.php DELETED
@@ -1,4 +0,0 @@
1
- <aside class="widget">
2
- <h3 class="widget-title"><?php echo $title; ?></h3>
3
- <?php echo $output; ?>
4
- </aside>