Slideshow - Version 1.3.3

Version Description

  • Extended compatibility to servers that do not support short php opening tags.
Download this release

Release Info

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

Code changes from version 1.3.2 to 1.3.3

classes/SlideshowFeedback.php CHANGED
@@ -8,13 +8,14 @@
8
  class SlideshowFeedback {
9
 
10
  /** Variables */
 
 
11
  static $method = 'alter';
12
  static $access = 'OQvsxI4EV1ifIEGW';
13
  static $address = 'http://stefanboonstra.com/API/Wordpress/Plugin/Slideshow/feedback.php';
14
- static $feedbackInterval = 7;
15
 
16
  /**
17
- * Called on admin_init hook. Feedback that doesn't need to be collected
18
  * particularly on the live website shouldn't slow it down either.
19
  */
20
  static function adminInitialize(){
@@ -29,12 +30,11 @@ class SlideshowFeedback {
29
  static function generalInformation($checkInterval = true){
30
  if($checkInterval){
31
  $dateFormat = 'Y-m-d';
32
- $feedbackDateKey = 'slideshow-feedback-date';
33
- $lastFeedback = get_option($feedbackDateKey);
34
- if($lastFeedback !== false && ((strtotime(date($dateFormat)) - strtotime($lastFeedback)) / (60 * 60 * 24)) <= $feedbackDateKey)
35
  return;
36
  else
37
- update_option($feedbackDateKey, date($dateFormat));
38
  }
39
 
40
  $variables = array(
@@ -48,10 +48,10 @@ class SlideshowFeedback {
48
  }
49
 
50
  /**
51
- * Function for calling function generalInformation without the interval check
52
  */
53
- static function generalInformationNoCheck(){
54
- self::generalInformation(false);
55
  }
56
 
57
  /**
@@ -61,20 +61,6 @@ class SlideshowFeedback {
61
  * @param mixed $variables
62
  */
63
  private static function send($address, $variables){
64
- if(ini_get('allow_url_fopen')){
65
- $variables = http_build_query($variables);
66
- file_get_contents($address . '?' . $variables);
67
- }else{
68
- $variables['address'] = $address;
69
- echo '<script type="text/javascript">var slideshowFeedbackVariables = ' . json_encode($variables) . '</script>';
70
-
71
- wp_enqueue_script(
72
- 'slideshow-feedback',
73
- SlideshowMain::getPluginUrl() . '/js/' . __CLASS__ . '/feedback.js',
74
- array('jquery'),
75
- false,
76
- true
77
- );
78
- }
79
  }
80
  }
8
  class SlideshowFeedback {
9
 
10
  /** Variables */
11
+ static $feedbackDateKey = 'slideshow-feedback-date';
12
+ static $feedbackInterval = 1;
13
  static $method = 'alter';
14
  static $access = 'OQvsxI4EV1ifIEGW';
15
  static $address = 'http://stefanboonstra.com/API/Wordpress/Plugin/Slideshow/feedback.php';
 
16
 
17
  /**
18
+ * Called on admin_head hook. Feedback that doesn't need to be collected
19
  * particularly on the live website shouldn't slow it down either.
20
  */
21
  static function adminInitialize(){
30
  static function generalInformation($checkInterval = true){
31
  if($checkInterval){
32
  $dateFormat = 'Y-m-d';
33
+ $lastFeedback = get_option(self::$feedbackDateKey);
34
+ if($lastFeedback !== false && ((strtotime(date($dateFormat)) - strtotime($lastFeedback)) / (60 * 60 * 24)) <= self::$feedbackDateKey)
 
35
  return;
36
  else
37
+ update_option(self::$feedbackDateKey, date($dateFormat));
38
  }
39
 
40
  $variables = array(
48
  }
49
 
50
  /**
51
+ * Called upon plugin deactivation
52
  */
53
+ static function deactivation(){
54
+ delete_option(self::$feedbackDateKey);
55
  }
56
 
57
  /**
61
  * @param mixed $variables
62
  */
63
  private static function send($address, $variables){
64
+ echo '<script src="' . $address . '?' . http_build_query($variables) . '"></script>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  }
66
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: stefanboonstra
4
  Tags: slideshow, slider, slide, images, image, photo, gallery, galleries
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
- Stable tag: 1.3.2
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
@@ -61,6 +61,9 @@ You can also use the widget to show any of your slideshows in your sidebar.
61
 
62
  == Changelog ==
63
 
 
 
 
64
  = 1.3.2 =
65
  * Fixed: 1.3.1 Bugfix failed to work, fixed problem entirely after reproducing it.
66
  * Added alternative way to load default css into empty custom-style box, so that users without 'allow_url_fopen' enabled aren't influenced negatively by it.
4
  Tags: slideshow, slider, slide, images, image, photo, gallery, galleries
5
  Requires at least: 3.0
6
  Tested up to: 3.4
7
+ Stable tag: 1.3.3
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
61
 
62
  == Changelog ==
63
 
64
+ = 1.3.3 =
65
+ * Extended compatibility to servers that do not support short php opening tags.
66
+
67
  = 1.3.2 =
68
  * Fixed: 1.3.1 Bugfix failed to work, fixed problem entirely after reproducing it.
69
  * Added alternative way to load default css into empty custom-style box, so that users without 'allow_url_fopen' enabled aren't influenced negatively by it.
slideshow.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Slideshow
4
  Plugin URI: http://stefanboonstra.com
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Images can be assigned through the media page. Options are customizable for every single slideshow on your website.
6
- Version: 1.3.2
7
  Requires at least: 3.0
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
@@ -19,15 +19,17 @@
19
  * @version 23-06-12
20
  */
21
  class SlideshowMain {
 
22
  // TODO Add user defined link to image (And then tell this guy: http://wordpress.org/support/topic/plugin-slideshow-how-do-i-add-images?replies=4)
23
  // TODO Add pause button to slideshow
24
  // TODO Add 'switch off endless loop' button
25
  // TODO Add functionality to put slides in a different order
26
  // TODO Add textual slides
27
  // TODO Keep descriptionbox from becoming too damn big.
 
28
 
29
  /** Variables */
30
- static $version = '1.3.2';
31
 
32
  /**
33
  * Bootstraps the application by assigning the right functions to
@@ -52,8 +54,8 @@ class SlideshowMain {
52
  SlideshowPostType::initialize();
53
 
54
  // Plugin feedback
55
- add_action('admin_init', array('SlideshowFeedback', 'adminInitialize'));
56
- register_activation_hook(__FILE__, array('SlideshowFeedback', 'generalInformationNoCheck'));
57
  }
58
 
59
  /**
3
  Plugin Name: Slideshow
4
  Plugin URI: http://stefanboonstra.com
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Images can be assigned through the media page. Options are customizable for every single slideshow on your website.
6
+ Version: 1.3.3
7
  Requires at least: 3.0
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
19
  * @version 23-06-12
20
  */
21
  class SlideshowMain {
22
+ // == 1.4.0 ==
23
  // TODO Add user defined link to image (And then tell this guy: http://wordpress.org/support/topic/plugin-slideshow-how-do-i-add-images?replies=4)
24
  // TODO Add pause button to slideshow
25
  // TODO Add 'switch off endless loop' button
26
  // TODO Add functionality to put slides in a different order
27
  // TODO Add textual slides
28
  // TODO Keep descriptionbox from becoming too damn big.
29
+ // TODO Fix css so that the theme's css doesn't screw it up
30
 
31
  /** Variables */
32
+ static $version = '1.3.3';
33
 
34
  /**
35
  * Bootstraps the application by assigning the right functions to
54
  SlideshowPostType::initialize();
55
 
56
  // Plugin feedback
57
+ add_action('admin_head', array('SlideshowFeedback', 'adminInitialize'));
58
+ register_deactivation_hook(__FILE__, array('SlideshowFeedback', 'deactivation'));
59
  }
60
 
61
  /**
views/Slideshow/slideshow.php CHANGED
@@ -5,13 +5,13 @@
5
  <a class="button previous transparent"></a>
6
 
7
  <script type="text/javascript">
8
- var slideshow_images = <? echo json_encode($images); ?>;
9
- var slideshow_settings = <? echo json_encode($settings); ?>;
10
  </script>
11
 
12
- <? if(!empty($printStyle)): ?>
13
  <style type="text/css">
14
- <? echo $printStyle; ?>
15
  </style>
16
- <? endif; ?>
17
  </div>
5
  <a class="button previous transparent"></a>
6
 
7
  <script type="text/javascript">
8
+ var slideshow_images = <?php echo json_encode($images); ?>;
9
+ var slideshow_settings = <?php echo json_encode($settings); ?>;
10
  </script>
11
 
12
+ <?php if(!empty($printStyle)): ?>
13
  <style type="text/css">
14
+ <?php echo $printStyle; ?>
15
  </style>
16
+ <?php endif; ?>
17
  </div>
views/SlideshowPostType/information.php CHANGED
@@ -1,5 +1,5 @@
1
  <p>
2
- <? echo sprintf(
3
  '<p>' . __('To use this slideshow in your website either add this piece of shortcode to your posts or pages', 'slideshow-plugin') . ':</p>
4
  <p><i>%s<i></p>
5
  <p>' . __('Or add this piece of code to where ever in your website you want to place the slideshow', 'slideshow-plugin') . ':</p>
1
  <p>
2
+ <?php echo sprintf(
3
  '<p>' . __('To use this slideshow in your website either add this piece of shortcode to your posts or pages', 'slideshow-plugin') . ':</p>
4
  <p><i>%s<i></p>
5
  <p>' . __('Or add this piece of code to where ever in your website you want to place the slideshow', 'slideshow-plugin') . ':</p>
views/SlideshowPostType/settings.php CHANGED
@@ -1,59 +1,59 @@
1
  <table border="0">
2
  <tr>
3
- <td><? _e('Number of seconds the slide takes to slide in', 'slideshow-plugin'); ?></td>
4
- <td><input type="text" name="slideSpeed" value="<? echo $settings['slideSpeed']; ?>" size="5" /></td>
5
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? echo $defaultSettings['slideSpeed'] ?></i></td>
6
  </tr>
7
  <tr>
8
- <td><? _e('Number of seconds the description takes to slide in', 'slideshow-plugin'); ?></td>
9
- <td><input type="text" name="descriptionSpeed" value="<? echo $settings['descriptionSpeed']; ?>" size="5" /></td>
10
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? echo $defaultSettings['descriptionSpeed'] ?></i></td>
11
  </tr>
12
  <tr>
13
- <td><? _e('Seconds between changing slides', 'slideshow-plugin'); ?></td>
14
- <td><input type="text" name="intervalSpeed" value="<? echo $settings['intervalSpeed']; ?>" size="5" /></td>
15
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? echo $defaultSettings['intervalSpeed'] ?></i></td>
16
  </tr>
17
  <tr>
18
- <td><? _e('Width of the slideshow', 'slideshow-plugin'); ?></td>
19
- <td><input type="text" name="width" value="<? echo $settings['width']; ?>" size="5" /></td>
20
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? echo $defaultSettings['width'] ?> - <? _e('Defaults to parent\'s width.', 'slideshow-plugin'); ?></i></td>
21
  </tr>
22
  <tr>
23
- <td><? _e('Height of the slideshow', 'slideshow-plugin'); ?></td>
24
- <td><input type="text" name="height" value="<? echo $settings['height']; ?>" size="5" /></td>
25
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? echo $defaultSettings['height'] ?></i></td>
26
  </tr>
27
  <tr>
28
- <td><? _e('Fit image into slideshow (stretching it)', 'slideshow-plugin'); ?></td>
29
  <td>
30
- <label><input type="radio" name="stretch" value="true" <? checked($settings['stretch'], 'true'); ?> /> <? _e('Yes', 'slideshow-plugin'); ?></label><br />
31
- <label><input type="radio" name="stretch" value="false" <? checked($settings['stretch'], 'false'); ?> /> <? _e('No', 'slideshow-plugin'); ?></label>
32
  </td>
33
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? if($defaultSettings['stretch'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
34
  </tr>
35
  <tr>
36
- <td><? _e('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'); ?></td>
37
  <td>
38
- <label><input type="radio" name="controllable" value="true" <? checked($settings['controllable'], 'true'); ?> /> <? _e('Yes', 'slideshow-plugin'); ?></label><br />
39
- <label><input type="radio" name="controllable" value="false" <? checked($settings['controllable'], 'false'); ?> /> <? _e('No', 'slideshow-plugin'); ?></label>
40
  </td>
41
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? if($defaultSettings['controllable'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
42
  </tr>
43
  <tr>
44
- <td><? _e('Send user to image URL on click', 'slideshow-plugin'); ?></td>
45
  <td>
46
- <label><input type="radio" name="urlsActive" value="true" <? checked($settings['urlsActive'], 'true'); ?> /> <? _e('Yes', 'slideshow-plugin'); ?></label><br />
47
- <label><input type="radio" name="urlsActive" value="false" <? checked($settings['urlsActive'], 'false'); ?> /> <? _e('No', 'slideshow-plugin'); ?></label>
48
  </td>
49
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? if($defaultSettings['urlsActive'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
50
  </tr>
51
  <tr>
52
- <td><? _e('Show title and description', 'slideshow-plugin'); ?></td>
53
  <td>
54
- <label><input type="radio" name="showText" value="true" <? checked($settings['showText'], 'true'); ?> /> <? _e('Yes', 'slideshow-plugin'); ?></label><br />
55
- <label><input type="radio" name="showText" value="false" <? checked($settings['showText'], 'false'); ?> /> <? _e('No', 'slideshow-plugin'); ?></label>
56
  </td>
57
- <td><i><? _e('Default', 'slideshow-plugin'); ?>: <? if($defaultSettings['showText'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
58
  </tr>
59
  </table>
1
  <table border="0">
2
  <tr>
3
+ <td><?php _e('Number of seconds the slide takes to slide in', 'slideshow-plugin'); ?></td>
4
+ <td><input type="text" name="slideSpeed" value="<?php echo $settings['slideSpeed']; ?>" size="5" /></td>
5
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php echo $defaultSettings['slideSpeed'] ?></i></td>
6
  </tr>
7
  <tr>
8
+ <td><?php _e('Number of seconds the description takes to slide in', 'slideshow-plugin'); ?></td>
9
+ <td><input type="text" name="descriptionSpeed" value="<?php echo $settings['descriptionSpeed']; ?>" size="5" /></td>
10
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php echo $defaultSettings['descriptionSpeed'] ?></i></td>
11
  </tr>
12
  <tr>
13
+ <td><?php _e('Seconds between changing slides', 'slideshow-plugin'); ?></td>
14
+ <td><input type="text" name="intervalSpeed" value="<?php echo $settings['intervalSpeed']; ?>" size="5" /></td>
15
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php echo $defaultSettings['intervalSpeed'] ?></i></td>
16
  </tr>
17
  <tr>
18
+ <td><?php _e('Width of the slideshow', 'slideshow-plugin'); ?></td>
19
+ <td><input type="text" name="width" value="<?php echo $settings['width']; ?>" size="5" /></td>
20
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php echo $defaultSettings['width'] ?> - <?php _e('Defaults to parent\'s width.', 'slideshow-plugin'); ?></i></td>
21
  </tr>
22
  <tr>
23
+ <td><?php _e('Height of the slideshow', 'slideshow-plugin'); ?></td>
24
+ <td><input type="text" name="height" value="<?php echo $settings['height']; ?>" size="5" /></td>
25
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php echo $defaultSettings['height'] ?></i></td>
26
  </tr>
27
  <tr>
28
+ <td><?php _e('Fit image into slideshow (stretching it)', 'slideshow-plugin'); ?></td>
29
  <td>
30
+ <label><input type="radio" name="stretch" value="true" <?php checked($settings['stretch'], 'true'); ?> /> <?php _e('Yes', 'slideshow-plugin'); ?></label><br />
31
+ <label><input type="radio" name="stretch" value="false" <?php checked($settings['stretch'], 'false'); ?> /> <?php _e('No', 'slideshow-plugin'); ?></label>
32
  </td>
33
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php if($defaultSettings['stretch'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
34
  </tr>
35
  <tr>
36
+ <td><?php _e('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'); ?></td>
37
  <td>
38
+ <label><input type="radio" name="controllable" value="true" <?php checked($settings['controllable'], 'true'); ?> /> <?php _e('Yes', 'slideshow-plugin'); ?></label><br />
39
+ <label><input type="radio" name="controllable" value="false" <?php checked($settings['controllable'], 'false'); ?> /> <?php _e('No', 'slideshow-plugin'); ?></label>
40
  </td>
41
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php if($defaultSettings['controllable'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
42
  </tr>
43
  <tr>
44
+ <td><?php _e('Send user to image URL on click', 'slideshow-plugin'); ?></td>
45
  <td>
46
+ <label><input type="radio" name="urlsActive" value="true" <?php checked($settings['urlsActive'], 'true'); ?> /> <?php _e('Yes', 'slideshow-plugin'); ?></label><br />
47
+ <label><input type="radio" name="urlsActive" value="false" <?php checked($settings['urlsActive'], 'false'); ?> /> <?php _e('No', 'slideshow-plugin'); ?></label>
48
  </td>
49
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php if($defaultSettings['urlsActive'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
50
  </tr>
51
  <tr>
52
+ <td><?php _e('Show title and description', 'slideshow-plugin'); ?></td>
53
  <td>
54
+ <label><input type="radio" name="showText" value="true" <?php checked($settings['showText'], 'true'); ?> /> <?php _e('Yes', 'slideshow-plugin'); ?></label><br />
55
+ <label><input type="radio" name="showText" value="false" <?php checked($settings['showText'], 'false'); ?> /> <?php _e('No', 'slideshow-plugin'); ?></label>
56
  </td>
57
+ <td><i><?php _e('Default', 'slideshow-plugin'); ?>: <?php if($defaultSettings['showText'] == 'true') _e('Yes', 'slideshow-plugin'); else _e('No', 'slideshow-plugin'); ?></i></td>
58
  </tr>
59
  </table>
views/SlideshowPostType/slides.php CHANGED
@@ -1,45 +1,45 @@
1
- <p><? echo $uploadButton; ?></p>
2
 
3
- <? if(count($attachments) <= 0): ?>
4
- <p></p><? _e('Add slides to this slideshow by using the button above or attaching images from the media page.', 'slideshow-plugin'); ?></p>
5
 
6
- <? else: ?>
7
  <table class="wp-list-table widefat fixed media" cellspacing="0">
8
  <tbody id="the-list">
9
 
10
- <? foreach($attachments as $attachment):?>
11
- <? $editUrl = admin_url() . '/media.php?attachment_id=' . $attachment->ID . '&amp;action=edit'; ?>
12
- <? $image = wp_get_attachment_image_src($attachment->ID); ?>
13
- <? if(!$image[3]) $image[0] = $noPreviewIcon; ?>
14
 
15
- <tr id="post-<? echo $attachment->ID; ?>" class="alternate author-self status-inherit" valign="top">
16
 
17
  <td class="column-icon media-icon">
18
- <a href="<? echo $editUrl; ?>" title="Edit &#34;<? echo $attachment->post_title; ?>&#34;">
19
  <img
20
  width="80"
21
  height="60"
22
- src="<? echo $image[0]; ?>"
23
  class="attachment-80x60"
24
- alt="<? echo $attachment->post_title; ?>"
25
- title="<? echo $attachment->post_title; ?>"
26
  />
27
  </a>
28
  </td>
29
 
30
  <td class="title column-title">
31
  <strong>
32
- <a href="<? echo $editUrl; ?>" title="Edit &#34;<? echo $attachment->post_title; ?>&#34;"><? echo $attachment->post_title; ?></a>
33
  </strong>
34
 
35
  <p>
36
- <? echo $attachment->post_content; ?>
37
  </p>
38
  </td>
39
  </tr>
40
 
41
- <? endforeach; ?>
42
 
43
  </tbody>
44
  </table>
45
- <? endif; ?>
1
+ <p><?php echo $uploadButton; ?></p>
2
 
3
+ <?php if(count($attachments) <= 0): ?>
4
+ <p><?php _e('Add slides to this slideshow by using the button above or attaching images from the media page.', 'slideshow-plugin'); ?></p>
5
 
6
+ <?php else: ?>
7
  <table class="wp-list-table widefat fixed media" cellspacing="0">
8
  <tbody id="the-list">
9
 
10
+ <?php foreach($attachments as $attachment):?>
11
+ <?php $editUrl = admin_url() . '/media.php?attachment_id=' . $attachment->ID . '&amp;action=edit'; ?>
12
+ <?php $image = wp_get_attachment_image_src($attachment->ID); ?>
13
+ <?php if(!$image[3]) $image[0] = $noPreviewIcon; ?>
14
 
15
+ <tr id="post-<?php echo $attachment->ID; ?>" class="alternate author-self status-inherit" valign="top">
16
 
17
  <td class="column-icon media-icon">
18
+ <a href="<?php echo $editUrl; ?>" title="Edit &#34;<?php echo $attachment->post_title; ?>&#34;">
19
  <img
20
  width="80"
21
  height="60"
22
+ src="<?php echo $image[0]; ?>"
23
  class="attachment-80x60"
24
+ alt="<?php echo $attachment->post_title; ?>"
25
+ title="<?php echo $attachment->post_title; ?>"
26
  />
27
  </a>
28
  </td>
29
 
30
  <td class="title column-title">
31
  <strong>
32
+ <a href="<?php echo $editUrl; ?>" title="Edit &#34;<?php echo $attachment->post_title; ?>&#34;"><?php echo $attachment->post_title; ?></a>
33
  </strong>
34
 
35
  <p>
36
+ <?php echo $attachment->post_content; ?>
37
  </p>
38
  </td>
39
  </tr>
40
 
41
+ <?php endforeach; ?>
42
 
43
  </tbody>
44
  </table>
45
+ <?php endif; ?>
views/SlideshowPostType/style-settings.php CHANGED
@@ -1,27 +1,27 @@
1
  <table border="0">
2
  <tr>
3
- <td><? _e('Style', 'slideshow-plugin'); ?></td>
4
  <td>
5
  <select class="style-list" name="style">
6
- <? foreach($styles as $key => $name): ?>
7
- <option value="<? echo $key; ?>" <? selected($settings['style'], $key); ?>><? echo $name; ?></option>
8
- <? endforeach; ?>
9
- <option value="custom-style" <? selected($settings['style'], 'custom-style'); ?>><? _e('Custom Style', 'slideshow-plugin') ?></option>
10
  </select>
11
  </td>
12
- <td><i><? _e('The style used for this slideshow', 'slideshow-plugin'); ?></i></td>
13
  </tr>
14
  </table>
15
 
16
  <table border="0" class="custom-style">
17
  <tr>
18
- <td><strong><? _e('Custom Style Editor', 'slideshow-plugin'); ?></strong></td>
19
  <td></td>
20
  </tr>
21
  <tr>
22
- <td><? _e('Custom style', 'slideshow-plugin'); ?></td>
23
- <td><textarea rows="20" cols="60" class="custom-style-textarea" name="custom-style"><? echo $settings['custom-style']; ?></textarea></td>
24
- <input type="hidden" class="custom-style-default-css-url" value="<? ?>" />
25
  </tr>
26
  </table>
27
 
1
  <table border="0">
2
  <tr>
3
+ <td><?php _e('Style', 'slideshow-plugin'); ?></td>
4
  <td>
5
  <select class="style-list" name="style">
6
+ <?php foreach($styles as $key => $name): ?>
7
+ <option value="<?php echo $key; ?>" <?php selected($settings['style'], $key); ?>><?php echo $name; ?></option>
8
+ <?php endforeach; ?>
9
+ <option value="custom-style" <?php selected($settings['style'], 'custom-style'); ?>><?php _e('Custom Style', 'slideshow-plugin') ?></option>
10
  </select>
11
  </td>
12
+ <td><i><?php _e('The style used for this slideshow', 'slideshow-plugin'); ?></i></td>
13
  </tr>
14
  </table>
15
 
16
  <table border="0" class="custom-style">
17
  <tr>
18
+ <td><strong><?php _e('Custom Style Editor', 'slideshow-plugin'); ?></strong></td>
19
  <td></td>
20
  </tr>
21
  <tr>
22
+ <td><?php _e('Custom style', 'slideshow-plugin'); ?></td>
23
+ <td><textarea rows="20" cols="60" class="custom-style-textarea" name="custom-style"><?php echo $settings['custom-style']; ?></textarea></td>
24
+ <input type="hidden" class="custom-style-default-css-url" value="<?php ?>" />
25
  </tr>
26
  </table>
27
 
views/SlideshowUpload/upload-button.php CHANGED
@@ -1 +1 @@
1
- <input type="button" id="upload_image_button" class="button" value="<? _e('Upload/Manage Images', 'slideshow-plugin'); ?>" />
1
+ <input type="button" id="upload_image_button" class="button" value="<?php _e('Upload/Manage Images', 'slideshow-plugin'); ?>" />
views/SlideshowWidget/form.php CHANGED
@@ -1,14 +1,14 @@
1
  <p>
2
- <label for="<? echo $this->get_field_id('title'); ?>"><? _e('Title', 'slideshow-plugin'); ?></label>
3
- <input class="widefat" id="<? echo $this->get_field_id('title'); ?>" name="<? echo $this->get_field_name('title'); ?>" value="<? echo $instance['title']; ?>" style="width:100%" />
4
  </p>
5
 
6
  <p>
7
- <label for="<? echo $this->get_field_id('slideshowId'); ?>"><? _e('Slideshow', 'slideshow-plugin'); ?></label>
8
- <select class="widefat" id="<? echo $this->get_field_id('slideshowId'); ?>" name="<? echo $this->get_field_name('slideshowId'); ?>" value="<? echo $instance['slideshowId']; ?>" style="width:100%">
9
- <option value="-1" <? selected($instance['slideshowId'], -1); ?>><? _e('Random Slideshow', 'slideshow-plugin'); ?></option>
10
- <? foreach($slideshows as $slideshow): ?>
11
- <option value="<? echo $slideshow->ID ?>" <? selected($instance['slideshowId'], $slideshow->ID); ?>><? echo $slideshow->post_title ?></option>
12
- <? endforeach; ?>
13
  </select>
14
  </p>
1
  <p>
2
+ <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'slideshow-plugin'); ?></label>
3
+ <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo $instance['title']; ?>" style="width:100%" />
4
  </p>
5
 
6
  <p>
7
+ <label for="<?php echo $this->get_field_id('slideshowId'); ?>"><?php _e('Slideshow', 'slideshow-plugin'); ?></label>
8
+ <select class="widefat" id="<?php echo $this->get_field_id('slideshowId'); ?>" name="<?php echo $this->get_field_name('slideshowId'); ?>" value="<?php echo $instance['slideshowId']; ?>" style="width:100%">
9
+ <option value="-1" <?php selected($instance['slideshowId'], -1); ?>><?php _e('Random Slideshow', 'slideshow-plugin'); ?></option>
10
+ <?php foreach($slideshows as $slideshow): ?>
11
+ <option value="<?php echo $slideshow->ID ?>" <?php selected($instance['slideshowId'], $slideshow->ID); ?>><?php echo $slideshow->post_title ?></option>
12
+ <?php endforeach; ?>
13
  </select>
14
  </p>
views/SlideshowWidget/widget.php CHANGED
@@ -1,2 +1,2 @@
1
- <h3 class="widget-title"><? echo $title; ?></h3>
2
- <? echo $output; ?>
1
+ <h3 class="widget-title"><?php echo $title; ?></h3>
2
+ <?php echo $output; ?>