Logo Carousel - Version 1.4.3

Version Description

(2014-01-27) = * Bugfixes

Download this release

Release Info

Developer ysdbjorn
Plugin Icon 128x128 Logo Carousel
Version 1.4.3
Comparing to
See all releases

Code changes from version 1.4.2 to 1.4.3

kiwi_logo_carousel.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin URL: http://www.yourstyledesign.nl/
4
  Description: Highlight your clients, partners and sponsors on your website in a Logo Carousel
5
  Author: Kiwi Plugins by Yourstyledesign
6
- Version: 1.4.2
7
  Author URI: http://www.yourstyledesign.nl/
8
  License: GPLv2
9
  */
3
  Plugin URL: http://www.yourstyledesign.nl/
4
  Description: Highlight your clients, partners and sponsors on your website in a Logo Carousel
5
  Author: Kiwi Plugins by Yourstyledesign
6
+ Version: 1.4.3
7
  Author URI: http://www.yourstyledesign.nl/
8
  License: GPLv2
9
  */
kiwi_logo_carousel_admin.php CHANGED
@@ -158,14 +158,52 @@ class kiwi_logo_carousel_admin {
158
 
159
  // Save the custom metabox data
160
  function metabox_savedata(){
161
- if ( 'kwlogos' == $_POST['post_type'] ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  if ( ! current_user_can( 'edit_page', $post_id ) ){return;}
163
  }
164
  else {return;}
 
 
 
 
165
  if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){ return $post_id; }
166
- $post_ID = $_POST['post_ID'];
167
- $kwlogos_link = sanitize_text_field( $_POST['kwlogos_link'] );
168
- add_post_meta($post_ID, '_kwlogos_link', $kwlogos_link, true) or update_post_meta($post_ID, '_kwlogos_link', $kwlogos_link);
 
 
 
 
169
  }
170
 
171
  // Admin Page
@@ -269,7 +307,7 @@ class kiwi_logo_carousel_admin {
269
  </tr>
270
  <tr valign="top">
271
  <th scope="row"><?php _e('Speed (ms)','kiwi_logo_carousel'); ?></th>
272
- <td><input name="klc_speed" type="number" value="<?=$p['speed'];?>"/></td>
273
  </tr>
274
  <tr valign="top">
275
  <th scope="row"><?php _e('Infinite Loop','kiwi_logo_carousel'); ?></th>
@@ -360,7 +398,7 @@ class kiwi_logo_carousel_admin {
360
  <table class="form-table">
361
  <tr valign="top">
362
  <th scope="row"><?php _e('Logo Margin','kiwi_logo_carousel'); ?></th>
363
- <td><input name="klc_slidemargin" type="number" value="<?=$p['slideMargin']?>"/></td>
364
  </tr>
365
  <tr valign="top">
366
  <th scope="row"><?php _e('Logo Style','kiwi_logo_carousel'); ?></th>
@@ -393,19 +431,19 @@ class kiwi_logo_carousel_admin {
393
  </tr>
394
  <tr valign="top">
395
  <th scope="row"><?php _e('Minimal slides','kiwi_logo_carousel'); ?></th>
396
- <td><input name="klc_minslides" type="number" value="<?=$p['minSlides']?>"/></td>
397
  </tr>
398
  <tr valign="top">
399
  <th scope="row"><?php _e('Maximum slides','kiwi_logo_carousel'); ?></th>
400
- <td><input name="klc_maxslides" type="number" value="<?=$p['maxSlides']?>"/></td>
401
  </tr>
402
  <tr valign="top">
403
  <th scope="row"><?php _e('Move slides','kiwi_logo_carousel'); ?></th>
404
- <td><input name="klc_moveslides" type="number" value="<?=$p['moveSlides']?>"/></td>
405
  </tr>
406
  <tr valign="top">
407
  <th scope="row"><?php _e('Slide Width','kiwi_logo_carousel'); ?></th>
408
- <td><input name="klc_slidewidth" type="number" value="<?=$p['slideWidth']?>"/></td>
409
  </tr>
410
  </table>
411
  </div>
158
 
159
  // Save the custom metabox data
160
  function metabox_savedata(){
161
+
162
+ $post_type = null;
163
+ $post_id = null;
164
+ $link_field = null;
165
+
166
+ if( isset($_GET['post_type']) ) {
167
+ $post_type = $_GET['post_type'];
168
+ }
169
+ else if( isset($_POST['post_type']) ) {
170
+ $post_type = $_POST['post_type'];
171
+ }
172
+ if( isset($_GET['post_id']) ) {
173
+ $post_id = $_GET['post_id'];
174
+ }
175
+ else if( isset($_POST['post_id']) ) {
176
+ $post_id = $_POST['post_id'];
177
+ }
178
+
179
+ if( isset($_GET['kwlogos_link']) ) {
180
+ $link_field = $_GET['kwlogos_link'];
181
+ }
182
+ else if( isset($_POST['kwlogos_link']) ) {
183
+ $link_field = $_POST['kwlogos_link'];
184
+ }
185
+
186
+ if ( 'kwlogos' == $post_type ) {
187
+ if ( ! current_user_can( 'edit_posts') ){return;}
188
+ }
189
+ else {return;}
190
+
191
+ if (( !$post_type == null )&& ('kwlogos' == $post_type)) {
192
  if ( ! current_user_can( 'edit_page', $post_id ) ){return;}
193
  }
194
  else {return;}
195
+
196
+
197
+ // At this point we have established that we are on a specific post type page and maybe have a specific post id
198
+ // and that the user is allowed to save it.
199
  if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){ return $post_id; }
200
+
201
+ if (! $link_field == null) {
202
+ $link_field = sanitize_text_field( $link_field );
203
+ } else {
204
+ $link_field = '';
205
+ }
206
+ add_post_meta($post_id, '_kwlogos_link', $link_field, true) or update_post_meta($post_id, '_kwlogos_link', $link_field);
207
  }
208
 
209
  // Admin Page
307
  </tr>
308
  <tr valign="top">
309
  <th scope="row"><?php _e('Speed (ms)','kiwi_logo_carousel'); ?></th>
310
+ <td><input name="klc_speed" type="number" value="<?php if (isset($p['speed'])) {echo $p['speed'];} ?>"/></td>
311
  </tr>
312
  <tr valign="top">
313
  <th scope="row"><?php _e('Infinite Loop','kiwi_logo_carousel'); ?></th>
398
  <table class="form-table">
399
  <tr valign="top">
400
  <th scope="row"><?php _e('Logo Margin','kiwi_logo_carousel'); ?></th>
401
+ <td><input name="klc_slidemargin" type="number" value="<?php if (isset($p['slideMargin'])) {echo $p['slideMargin'];} ?>"/></td>
402
  </tr>
403
  <tr valign="top">
404
  <th scope="row"><?php _e('Logo Style','kiwi_logo_carousel'); ?></th>
431
  </tr>
432
  <tr valign="top">
433
  <th scope="row"><?php _e('Minimal slides','kiwi_logo_carousel'); ?></th>
434
+ <td><input name="klc_minslides" type="number" value="<?php if (isset($p['minSlides'])) {echo $p['minSlides'];} ?>"/></td>
435
  </tr>
436
  <tr valign="top">
437
  <th scope="row"><?php _e('Maximum slides','kiwi_logo_carousel'); ?></th>
438
+ <td><input name="klc_maxslides" type="number" value="<?php if (isset($p['maxSlides'])) {echo $p['maxSlides'];} ?>"/></td>
439
  </tr>
440
  <tr valign="top">
441
  <th scope="row"><?php _e('Move slides','kiwi_logo_carousel'); ?></th>
442
+ <td><input name="klc_moveslides" type="number" value="<?php if (isset($p['moveSlides'])) {echo $p['moveSlides'];} ?>"/></td>
443
  </tr>
444
  <tr valign="top">
445
  <th scope="row"><?php _e('Slide Width','kiwi_logo_carousel'); ?></th>
446
+ <td><input name="klc_slidewidth" type="number" value="<?php if (isset($p['slideWidth'])) {echo $p['slideWidth'];} ?>"/></td>
447
  </tr>
448
  </table>
449
  </div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: ysdbjorn
3
  Donate link: http://getkiwi.org/donate/
4
  Tags: logo, slider, carousel
5
  Requires at least: 3.6
6
- Tested up to: 3.8
7
- Stable tag: 1.4.2
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,8 +25,6 @@ Show your partners, clients or sponsors on your website in a logo carousel!
25
  <li>Multilanguage, English and Dutch</li>
26
  </ul>
27
 
28
- <p>More than 500 downloads already. Thanks for downloading!</p>
29
-
30
  <p>Kiwi Logo Carousel uses code and libraries from <a target="_blank" href="http://bxslider.com/">bxSlider</a> and <a target="_blank" href="http://10up.com/plugins/simple-page-ordering-wordpress/">Simple Page Ordering</a></p>
31
 
32
  == Installation ==
@@ -49,6 +47,14 @@ Because the slug 'default' is already used for displaying all the logos.
49
 
50
  We tested this plugin with: Internet Explorer 8, 9, 10; Chrome; Safari; Firefox; Opera;
51
 
 
 
 
 
 
 
 
 
52
  == Screenshots ==
53
 
54
  1. The Logo Carousel in action
@@ -59,6 +65,9 @@ We tested this plugin with: Internet Explorer 8, 9, 10; Chrome; Safari; Firefox;
59
 
60
  == Changelog ==
61
 
 
 
 
62
  = 1.4.2 (2014-01-23) =
63
  * Some little improvements
64
 
@@ -66,7 +75,7 @@ We tested this plugin with: Internet Explorer 8, 9, 10; Chrome; Safari; Firefox;
66
  * Some changes in the Dutch translation file
67
 
68
  = 1.4.0 (2014-01-10) =
69
- * Bugfix: Ticker Mode glitch when the loop start over
70
  * Bugfix: Pause on hover in Ticker Mode does not work
71
  * Improvement: Next & Previous controls are now suitable for retina displays.
72
  * Added Autoplay option. Turned on by default.
3
  Donate link: http://getkiwi.org/donate/
4
  Tags: logo, slider, carousel
5
  Requires at least: 3.6
6
+ Tested up to: 3.8.1
7
+ Stable tag: 1.4.3
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
  <li>Multilanguage, English and Dutch</li>
26
  </ul>
27
 
 
 
28
  <p>Kiwi Logo Carousel uses code and libraries from <a target="_blank" href="http://bxslider.com/">bxSlider</a> and <a target="_blank" href="http://10up.com/plugins/simple-page-ordering-wordpress/">Simple Page Ordering</a></p>
29
 
30
  == Installation ==
47
 
48
  We tested this plugin with: Internet Explorer 8, 9, 10; Chrome; Safari; Firefox; Opera;
49
 
50
+ = What are the server requirements? =
51
+
52
+ You need a server running PHP version 5.4 or newer. Older versions are not supported and may cause problems.
53
+
54
+ = The slider is not displayed well =
55
+
56
+ Some CSS styles in themes may cause problems. Debug your CSS if you have any problems. The developer tools in Chrome or Firefox are a good tool for that. You can also try the Firebug extension for Firefox.
57
+
58
  == Screenshots ==
59
 
60
  1. The Logo Carousel in action
65
 
66
  == Changelog ==
67
 
68
+ = 1.4.3 (2014-01-27) =
69
+ * Bugfixes
70
+
71
  = 1.4.2 (2014-01-23) =
72
  * Some little improvements
73
 
75
  * Some changes in the Dutch translation file
76
 
77
  = 1.4.0 (2014-01-10) =
78
+ * Bugfix: Ticker Mode glitch when the loop starts over
79
  * Bugfix: Pause on hover in Ticker Mode does not work
80
  * Improvement: Next & Previous controls are now suitable for retina displays.
81
  * Added Autoplay option. Turned on by default.