Logo Slider - Version 1.4.2

Version Description

  • Fix for IE 11
  • Added option for 1 or 2 images per slide (so 3 is no longer lowest option)
Download this release

Release Info

Developer EnigmaWeb
Plugin Icon 128x128 Logo Slider
Version 1.4.2
Comparing to
See all releases

Code changes from version 1.1 to 1.4.2

arrows/arrow1-down.png ADDED
Binary file
arrows/arrow1-up.png ADDED
Binary file
arrows/arrow2-down.png ADDED
Binary file
arrows/arrow2-up.png ADDED
Binary file
arrows/arrow3-down.png ADDED
Binary file
arrows/arrow3-up.png ADDED
Binary file
arrows/arrow4-down.png ADDED
Binary file
arrows/arrow4-up.png ADDED
Binary file
arrows/arrow5-down.png ADDED
Binary file
arrows/arrow5-up.png ADDED
Binary file
arrows/arrow6-down.png ADDED
Binary file
arrows/arrow6-up.png ADDED
Binary file
arrows/arrow7-down.png ADDED
Binary file
arrows/arrow7-up.png ADDED
Binary file
arrows/off.png ADDED
Binary file
languages/lgs.pot ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014 Logo Slider
2
+ # This file is distributed under the same license as the Logo Slider package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Logo Slider 1.4\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/logo-slider\n"
7
+ "POT-Creation-Date: 2014-03-06 04:01:48+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: logo-slider.php:78
16
+ msgid "Settings"
17
+ msgstr ""
18
+
19
+ #: logo-slider.php:140
20
+ msgid ""
21
+ "Sorry, but the file you uploaded does not seem to be a valid image. Please "
22
+ "try again."
23
+ msgstr ""
24
+
25
+ #: logo-slider.php:256
26
+ msgid "Wordpress LogoSlider Images"
27
+ msgstr ""
28
+
29
+ #: logo-slider.php:259
30
+ msgid "Upload New Image"
31
+ msgstr ""
32
+
33
+ #: logo-slider.php:265
34
+ msgid "Select a File: "
35
+ msgstr ""
36
+
37
+ #: logo-slider.php:281 logo-slider.php:289
38
+ msgid "Image"
39
+ msgstr ""
40
+
41
+ #: logo-slider.php:282 logo-slider.php:290
42
+ msgid "Image Links To"
43
+ msgstr ""
44
+
45
+ #: logo-slider.php:283 logo-slider.php:291
46
+ msgid "Actions"
47
+ msgstr ""
48
+
49
+ #: logo-slider.php:380
50
+ msgid "Wordpress Logo Slider Settings"
51
+ msgstr ""
52
+
53
+ #: logo-slider.php:385
54
+ msgid "Size"
55
+ msgstr ""
56
+
57
+ #: logo-slider.php:386
58
+ msgid "Width: "
59
+ msgstr ""
60
+
61
+ #: logo-slider.php:386
62
+ msgid "Height: "
63
+ msgstr ""
64
+
65
+ #: logo-slider.php:400
66
+ msgid "Background Colour"
67
+ msgstr ""
68
+
69
+ #: logo-slider.php:401
70
+ msgid "Format: "
71
+ msgstr ""
72
+
73
+ #: logo-slider.php:404
74
+ msgid "Open logo links in New Window"
75
+ msgstr ""
76
+
77
+ #: logo-slider.php:408
78
+ msgid "Select Slider"
79
+ msgstr ""
80
+
81
+ #: logo-slider.php:411
82
+ msgid "Slide"
83
+ msgstr ""
84
+
85
+ #: logo-slider.php:412
86
+ msgid "Fade"
87
+ msgstr ""
88
+
89
+ #: logo-slider.php:417
90
+ msgid "Auto Slide"
91
+ msgstr ""
92
+
93
+ #: logo-slider.php:420
94
+ msgid "ON"
95
+ msgstr ""
96
+
97
+ #: logo-slider.php:421
98
+ msgid "OFF"
99
+ msgstr ""
100
+
101
+ #: logo-slider.php:424
102
+ msgid "Auto Slide Time"
103
+ msgstr ""
104
+
105
+ #: logo-slider.php:425
106
+ msgid "Set auto slide duration in seconds"
107
+ msgstr ""
108
+
109
+ #: logo-slider.php:428
110
+ msgid "Arrow Style"
111
+ msgstr ""
112
+
113
+ #: logo-slider.php:442
114
+ msgid "Custom CSS"
115
+ msgstr ""
116
+
117
+ #: logo-slider.php:449
118
+ msgid "Save Settings"
119
+ msgstr ""
120
+
121
+ #: logo-slider.php:460
122
+ msgid "Reset Settings"
123
+ msgstr ""
124
+
125
+ #. Plugin Name of the plugin/theme
126
+ msgid "Logo Slider"
127
+ msgstr ""
128
+
129
+ #. Plugin URI of the plugin/theme
130
+ msgid "http://www.wordpress.org/extend/plugins/logo-slider"
131
+ msgstr ""
132
+
133
+ #. Description of the plugin/theme
134
+ msgid ""
135
+ "Add a logo slideshow carousel to your site quicky and easily. Embedd in any "
136
+ "post/page using shortcode <code>[logo-slider]</code> or to your theme with "
137
+ "<code><?php logo_slider(); ?></code>"
138
+ msgstr ""
139
+
140
+ #. Author of the plugin/theme
141
+ msgid "Enigma Plugins"
142
+ msgstr ""
143
+
144
+ #. Author URI of the plugin/theme
145
+ msgid "http://www.enigmaplugins.com"
146
+ msgstr ""
logo-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Logo Slider
4
  Plugin URI: http://www.wordpress.org/extend/plugins/logo-slider
5
  Description: Add a logo slideshow carousel to your site quicky and easily. Embedd in any post/page using shortcode <code>[logo-slider]</code> or to your theme with <code><?php logo_slider(); ?></code>
6
- Version: 1.1
7
  Author: Enigma Digital
8
  Author URI: http://www.enigmaweb.com.au/
9
  */
@@ -15,6 +15,13 @@ This section defines the variables that
15
  will be used throughout the plugin
16
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
17
  */
 
 
 
 
 
 
 
18
  // define our defaults (filterable)
19
  $wp_logo_defaults = apply_filters('wp_logo_defaults', array(
20
 
@@ -105,9 +112,9 @@ function wp_logo_slider() {
105
 
106
  /*
107
  ///////////////////////////////////////////////
108
- this section handles uploading images, adding
109
- the image data to the database, deleting images,
110
- and deleting image data from the database.
111
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
112
  */
113
  // this function handles the file upload,
@@ -130,26 +137,28 @@ function wp_logo_handle_upload() {
130
  // if the uploaded file is NOT an image
131
  if(strpos($type, 'image') === FALSE) {
132
  unlink($file); // delete the file
133
- echo '<div class="error" id="message"><p>Sorry, but the file you uploaded does not seem to be a valid image. Please try again.</p></div>';
134
  return;
135
  }
136
 
137
- /*// if the image doesn't meet the minimum width/height requirements ...
138
- if($width < $wp_logo_slider_settings['slider_width'] || $height < $wp_logo_slider_settings['slider_height']) {
139
- unlink($file); // delete the image
140
- echo '<div class="error" id="message"><p>Sorry, but this image does not meet the minimum height/width requirements. Please upload another image</p></div>';
141
- return;
142
- }*/
143
-
144
  // if the image is larger than the width/height requirements, then scale it down.
145
  if($width > $wp_logo_slider_settings['slider_width'] || $height > $wp_logo_slider_settings['slider_height']) {
146
  // resize the image
147
- $resized = image_resize($file, $wp_logo_slider_settings['slider_width'], $wp_logo_slider_settings['slider_height'], true, 'resized');
148
- $resized_url = $upload_dir_url . basename($resized);
149
- // delete the original
150
- unlink($file);
151
- $file = $resized;
152
- $url = $resized_url;
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  // make the thumbnail
@@ -159,6 +168,10 @@ function wp_logo_handle_upload() {
159
  $thumbnail_url = $upload_dir_url . basename($thumbnail);
160
  }
161
 
 
 
 
 
162
  // use the timestamp as the array key and id
163
  $time = date('YmdHis');
164
 
@@ -213,7 +226,7 @@ will display a notice, and reset the update option.
213
  function wp_logo_slider_settings_update_check() {
214
  global $wp_logo_slider_settings;
215
  if(isset($wp_logo_slider_settings['update'])) {
216
- echo '<div class="updated fade" id="message"><p>Wordpress Logo Slider Settings <strong>'.$wp_logo_slider_settings['update'].'</strong></p></div>';
217
  unset($wp_logo_slider_settings['update']);
218
  update_option('wp_logo_slider_settings', $wp_logo_slider_settings);
219
  }
@@ -223,7 +236,7 @@ function wp_logo_slider_settings_update_check() {
223
  function wp_logo_slider_images_update_check() {
224
  global $wp_logo_slider_images;
225
  if($wp_logo_slider_images['update'] == 'Added' || $wp_logo_slider_images['update'] == 'Deleted' || $wp_logo_slider_images['update'] == 'Updated') {
226
- echo '<div class="updated fade" id="message"><p>Image(s) '.$wp_logo_slider_images['update'].' Successfully</p></div>';
227
  unset($wp_logo_slider_images['update']);
228
  update_option('wp_logo_slider_images', $wp_logo_slider_images);
229
  }
@@ -240,16 +253,16 @@ on the admin page. it's mostly form markup.
240
  function wp_logo_images_admin() { ?>
241
  <?php global $wp_logo_slider_images; ?>
242
  <?php wp_logo_slider_images_update_check(); ?>
243
- <h2><?php _e('Wordpress LogoSlider Images', 'wp_LogoSlider'); ?></h2>
244
 
245
  <table class="form-table">
246
- <tr valign="top"><th scope="row">Upload New Image</th>
247
  <td>
248
  <form enctype="multipart/form-data" method="post" action="?page=wp_logo_slider">
249
  <input type="hidden" name="post_id" id="post_id" value="0" />
250
  <input type="hidden" name="action" id="action" value="wp_handle_upload" />
251
 
252
- <label for="logo_images">Select a File: </label>
253
  <input type="file" name="logo_images" id="logo_images" />
254
  <input type="submit" class="button-primary" name="html-upload" value="Upload" />
255
  </form>
@@ -257,21 +270,25 @@ function wp_logo_images_admin() { ?>
257
  </tr>
258
  </table><br />
259
 
 
 
 
 
260
  <?php if(!empty($wp_logo_slider_images)) : ?>
261
- <table class="widefat fixed" cellspacing="0">
262
  <thead>
263
  <tr>
264
- <th scope="col" class="column-slug">Image</th>
265
- <th scope="col">Image Links To</th>
266
- <th scope="col" class="column-slug">Actions</th>
267
  </tr>
268
  </thead>
269
 
270
  <tfoot>
271
  <tr>
272
- <th scope="col" class="column-slug">Image</th>
273
- <th scope="col">Image Links To</th>
274
- <th scope="col" class="column-slug">Actions</th>
275
  </tr>
276
  </tfoot>
277
 
@@ -280,14 +297,14 @@ function wp_logo_images_admin() { ?>
280
  <form method="post" action="options.php">
281
  <?php settings_fields('wp_logo_slider_images'); ?>
282
  <?php foreach((array)$wp_logo_slider_images as $image => $data) : ?>
283
- <tr>
284
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][id]" value="<?php echo $data['id']; ?>" />
285
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file]" value="<?php echo $data['file']; ?>" />
286
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file_url]" value="<?php echo $data['file_url']; ?>" />
287
- <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail]" value="<?php echo $data['thumbnail']; ?>" />
288
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail_url]" value="<?php echo $data['thumbnail_url']; ?>" />
289
  <th scope="row" class="column-slug"><img src="<?php echo $data['thumbnail_url']; ?>" /></th>
290
- <td><input type="text" name="wp_logo_slider_images[<?php echo $image; ?>][image_links_to]" value="<?php echo $data['image_links_to']; ?>" size="30" /></td>
291
  <td class="column-slug"><input type="submit" class="button-primary" value="Update" /> <a href="?page=wp_logo_slider&amp;delete=<?php echo $image; ?>" class="button">Delete</a></td>
292
  </tr>
293
  <?php endforeach; ?>
@@ -301,39 +318,119 @@ function wp_logo_images_admin() { ?>
301
  <?php
302
  }
303
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  // display the settings administration code
305
  function wp_logo_settings_admin() { ?>
306
 
307
  <?php wp_logo_slider_settings_update_check(); ?>
308
- <h2><?php _e('Wordpress Logo Slider Settings', 'wp-LogoSlider'); ?></h2>
309
  <form method="post" action="options.php">
310
  <?php settings_fields('wp_logo_slider_settings'); ?>
311
  <?php global $wp_logo_slider_settings; $options = $wp_logo_slider_settings; ?>
312
  <table class="form-table">
313
- <tr><th scope="row">Size</th>
314
- <td>Width: <input type="text" name="wp_logo_slider_settings[slider_width]" value="<?php echo $options['slider_width'] ?>" size="4" /> Height: <input type="text" name="wp_logo_slider_settings[slider_height]" value="<?php echo $options['slider_height'] ?>" size="4" /></td></tr>
315
 
316
- <tr><th scope="row">Images Per Slide</th>
317
- <td><input type="text" name="wp_logo_slider_settings[num_img]" value="<?php echo $options['num_img'] ?>" size="4" /> <small>Number of logos per slide</small></td>
 
 
 
 
 
 
 
 
 
 
318
  </tr>
319
 
320
- <tr><th scope="row">Background Colour</th>
321
- <td><input type="text" name="wp_logo_slider_settings[bgcolour]" value="<?php echo $options['bgcolour'] ?>" /> <small>Format: #FFFFFF</small></td>
322
  </tr>
323
- <tr><th scope="row">Auto Slide</th>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  <td id="arrow-style">
325
 
326
- ON <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="1" <?php if($options['auto_slide']==1){echo 'checked="checked"';}?> />&nbsp; &nbsp;
327
- OFF <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="2" <?php if($options['auto_slide']==2){echo 'checked="checked"';}?>/>
328
  </td>
329
  </tr>
330
- <tr><th scope="row">Auto Slide Time</th>
331
- <td><input type="text" name="wp_logo_slider_settings[auto_slide_time]" value="<?php echo $options['auto_slide_time'] ?>" size="4" /> <small>Set auto slide duration in seconds</small></td>
332
  </tr>
333
 
334
- <tr><th scope="row">Arrow Style</th>
335
  <td id="arrow-style">
336
-
 
337
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow1.png" width="28" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="1" <?php if($options['arrow']==1){echo 'checked="checked"';}?> /></p>
338
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow2.png" width="31" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="2" <?php if($options['arrow']==2){echo 'checked="checked"';}?>/></p>
339
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow3.png" width="34" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="3" <?php if($options['arrow']==3){echo 'checked="checked"';}?>/></p>
@@ -344,14 +441,14 @@ function wp_logo_settings_admin() { ?>
344
 
345
  </td>
346
  </tr>
347
- <tr valign="top"><th scope="row">Custom CSS</th>
348
  <td><textarea name="wp_logo_slider_settings[custom_css]" rows="6" cols="70"><?php echo $options['custom_css']; ?></textarea></td>
349
  </tr>
350
  <input type="hidden" name="wp_logo_slider_settings[update]" value="UPDATED" />
351
 
352
  </table>
353
  <p class="submit">
354
- <input type="submit" class="button-primary" value="<?php _e('Save Settings') ?>" />
355
  </form>
356
 
357
  <!-- The Reset Option -->
@@ -362,7 +459,7 @@ function wp_logo_settings_admin() { ?>
362
  <input type="hidden" name="wp_logo_slider_settings[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
363
  <?php endforeach; ?>
364
  <input type="hidden" name="wp_logo_slider_settings[update]" value="RESET" />
365
- <input type="submit" class="button" value="<?php _e('Reset Settings') ?>" />
366
  </form>
367
  <!-- End Reset Option -->
368
  </p>
@@ -418,18 +515,72 @@ function logo_slider($args = array(), $content = null) {
418
  $newline = "\n"; // line break
419
  echo '<div id="logo-slider-wraper">';
420
 
 
421
 
422
- $data_chunks = array_chunk($wp_logo_slider_images, $wp_logo_slider_settings['num_img']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
423
  echo '<ul id="logo-slider">';
 
424
  foreach ($data_chunks as $data_chunk) {
425
  echo '<li class="slide">';
426
  foreach($data_chunk as $data) {
427
- if($data['image_links_to'])
428
- echo '<a href="'.$data['image_links_to'].'">';
429
- echo '<img src="'.$data['file_url'].'" class="logo-img" alt="" />';
430
-
431
- if($data['image_links_to'])
432
- echo '</a>';
433
  }
434
  echo '</li>';
435
  }
@@ -462,13 +613,47 @@ function wp_LogoSlider_scripts() {
462
  add_action('wp_footer', 'wp_slider_args', 15);
463
  function wp_slider_args() {
464
  global $wp_logo_slider_settings; ?>
465
-
466
-
467
  <script type="text/javascript">
468
  jQuery(document).ready(function($) {
469
- $('#logo-slider').before('<div class="slider-controls"><a href="#" id="prev">&lt;</a> <a href="#" id="next">&gt;</a></div>').cycle({
 
 
 
 
 
 
 
 
 
 
 
 
 
470
  timeout: <?php if($wp_logo_slider_settings['auto_slide'] == 1) {echo $wp_logo_slider_settings['auto_slide_time'] * 1000;} else { echo 0;} ?>,
 
 
 
 
 
 
471
  fx: 'scrollHorz',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  next: '#prev',
473
  prev: '#next',
474
  });
@@ -483,7 +668,7 @@ function wp_logo_slider_style() {
483
  global $wp_logo_slider_settings;
484
  global $options;
485
  ?>
486
-
487
  <style type="text/css" media="screen">
488
  <?php
489
  echo $wp_logo_slider_settings['custom_css'];
@@ -495,8 +680,7 @@ function wp_logo_slider_style() {
495
  .slider-controls{
496
  position:relative;
497
  width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px;
498
- top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 20 ?>px;
499
-
500
  }
501
  #logo-slider {
502
  position: relative;
@@ -505,6 +689,7 @@ function wp_logo_slider_style() {
505
  margin: 0; padding: 0;
506
  overflow: hidden;
507
  list-style:none;
 
508
  }
509
  .slide{
510
  list-style:none;
@@ -527,6 +712,185 @@ function wp_logo_slider_style() {
527
  float:left;
528
  margin-left:-50px
529
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  </style>
531
 
532
  <?php }
3
  Plugin Name: Logo Slider
4
  Plugin URI: http://www.wordpress.org/extend/plugins/logo-slider
5
  Description: Add a logo slideshow carousel to your site quicky and easily. Embedd in any post/page using shortcode <code>[logo-slider]</code> or to your theme with <code><?php logo_slider(); ?></code>
6
+ Version: 1.4.2
7
  Author: Enigma Digital
8
  Author URI: http://www.enigmaweb.com.au/
9
  */
15
  will be used throughout the plugin
16
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
17
  */
18
+
19
+
20
+ error_reporting(0);
21
+
22
+ // Localization / Internationalization
23
+ load_plugin_textdomain( 'lgs', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
24
+
25
  // define our defaults (filterable)
26
  $wp_logo_defaults = apply_filters('wp_logo_defaults', array(
27
 
112
 
113
  /*
114
  ///////////////////////////////////////////////
115
+ this section handles uploading images, adding
116
+ the image data to the database, deleting images,
117
+ and deleting image data from the database.
118
  \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
119
  */
120
  // this function handles the file upload,
137
  // if the uploaded file is NOT an image
138
  if(strpos($type, 'image') === FALSE) {
139
  unlink($file); // delete the file
140
+ echo '<div class="error" id="message"><p>'.__('Sorry, but the file you uploaded does not seem to be a valid image. Please try again.','lgs').'</p></div>';
141
  return;
142
  }
143
 
 
 
 
 
 
 
 
144
  // if the image is larger than the width/height requirements, then scale it down.
145
  if($width > $wp_logo_slider_settings['slider_width'] || $height > $wp_logo_slider_settings['slider_height']) {
146
  // resize the image
147
+
148
+ $width = $wp_logo_slider_settings['slider_width'];
149
+ $height = $wp_logo_slider_settings['slider_height'];
150
+ $image = wp_get_image_editor($file);
151
+ if(is_wp_error($image)){
152
+ return $image;
153
+ }
154
+ $resized = $image->resize($width, $height, TRUE);
155
+ $destFile = $image->generate_filename(NULL, NULL);
156
+ $saved = $image->save($destFile);
157
+
158
+ if(is_wp_error($saved)){
159
+ return $saved;
160
+ }
161
+ $newImgPath = $destFile;
162
  }
163
 
164
  // make the thumbnail
168
  $thumbnail_url = $upload_dir_url . basename($thumbnail);
169
  }
170
 
171
+ $row = 1;
172
+ foreach((array)$wp_logo_slider_images as $image => $data) :
173
+ $row++;
174
+ endforeach;
175
  // use the timestamp as the array key and id
176
  $time = date('YmdHis');
177
 
226
  function wp_logo_slider_settings_update_check() {
227
  global $wp_logo_slider_settings;
228
  if(isset($wp_logo_slider_settings['update'])) {
229
+ echo '<div class="updated fade" id="message"><p>'.__('Wordpress Logo Slider Settings <strong>'.$wp_logo_slider_settings['update'],'lgs').'</strong></p></div>';
230
  unset($wp_logo_slider_settings['update']);
231
  update_option('wp_logo_slider_settings', $wp_logo_slider_settings);
232
  }
236
  function wp_logo_slider_images_update_check() {
237
  global $wp_logo_slider_images;
238
  if($wp_logo_slider_images['update'] == 'Added' || $wp_logo_slider_images['update'] == 'Deleted' || $wp_logo_slider_images['update'] == 'Updated') {
239
+ echo '<div class="updated fade" id="message"><p>'.__('Image(s) '.$wp_logo_slider_images['update'].' Successfully','lgs').'</p></div>';
240
  unset($wp_logo_slider_images['update']);
241
  update_option('wp_logo_slider_images', $wp_logo_slider_images);
242
  }
253
  function wp_logo_images_admin() { ?>
254
  <?php global $wp_logo_slider_images; ?>
255
  <?php wp_logo_slider_images_update_check(); ?>
256
+ <h2><?php _e('Wordpress LogoSlider Images','lgs'); ?></h2>
257
 
258
  <table class="form-table">
259
+ <tr valign="top"><th scope="row"><?php _e('Upload New Image','lgs') ?></th>
260
  <td>
261
  <form enctype="multipart/form-data" method="post" action="?page=wp_logo_slider">
262
  <input type="hidden" name="post_id" id="post_id" value="0" />
263
  <input type="hidden" name="action" id="action" value="wp_handle_upload" />
264
 
265
+ <label for="logo_images"><?php _e('Select a File: ','lgs') ?></label>
266
  <input type="file" name="logo_images" id="logo_images" />
267
  <input type="submit" class="button-primary" name="html-upload" value="Upload" />
268
  </form>
270
  </tr>
271
  </table><br />
272
 
273
+ <p style="border:2px solid #999; border-radius: 10px; font-size: 12px; padding: 6px 10px; width: 24%;">
274
+ <strong>Note: </strong>Drag &amp; Drop is auto save.
275
+ </p>
276
+
277
  <?php if(!empty($wp_logo_slider_images)) : ?>
278
+ <table class="widefat fixed" cellspacing="0" id="image_sort" style="width:100%; table-layout:inherit;">
279
  <thead>
280
  <tr>
281
+ <th scope="col" class="column-slug"><?php _e('Image','lgs') ?></th>
282
+ <th scope="col"><?php _e('Image Links To','lgs') ?></th>
283
+ <th scope="col" class="column-slug"><?php _e('Actions','lgs') ?></th>
284
  </tr>
285
  </thead>
286
 
287
  <tfoot>
288
  <tr>
289
+ <th scope="col" class="column-slug"><?php _e('Image','lgs') ?></th>
290
+ <th scope="col"><?php _e('Image Links To','lgs') ?></th>
291
+ <th scope="col" class="column-slug"><?php _e('Actions','lgs') ?></th>
292
  </tr>
293
  </tfoot>
294
 
297
  <form method="post" action="options.php">
298
  <?php settings_fields('wp_logo_slider_images'); ?>
299
  <?php foreach((array)$wp_logo_slider_images as $image => $data) : ?>
300
+ <tr id="list_item_<?php echo $image ?>" class="list_item">
301
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][id]" value="<?php echo $data['id']; ?>" />
302
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file]" value="<?php echo $data['file']; ?>" />
303
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][file_url]" value="<?php echo $data['file_url']; ?>" />
304
+ <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail]" value="<?php //echo $data['thumbnail']; ?>" />
305
  <input type="hidden" name="wp_logo_slider_images[<?php echo $image; ?>][thumbnail_url]" value="<?php echo $data['thumbnail_url']; ?>" />
306
  <th scope="row" class="column-slug"><img src="<?php echo $data['thumbnail_url']; ?>" /></th>
307
+ <td><?php //echo $image; ?><input type="text" name="wp_logo_slider_images[<?php echo $image; ?>][image_links_to]" value="<?php echo $data['image_links_to']; ?>" size="30" /></td>
308
  <td class="column-slug"><input type="submit" class="button-primary" value="Update" /> <a href="?page=wp_logo_slider&amp;delete=<?php echo $image; ?>" class="button">Delete</a></td>
309
  </tr>
310
  <?php endforeach; ?>
318
  <?php
319
  }
320
 
321
+
322
+ /*
323
+ ///////////////////////////////////////////////
324
+ SORTABLE FUNCTION.
325
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
326
+ */
327
+
328
+ function image_sort(){
329
+ wp_enqueue_script('jquery');
330
+ ?>
331
+ <!--<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>-->
332
+ <?php
333
+ wp_enqueue_script('jquery-ui-sortable');
334
+ ?>
335
+ <script type="text/javascript">
336
+
337
+ jQuery(document).ready( function(e) {
338
+ jQuery('#image_sort').sortable({
339
+ items: '.list_item',
340
+ opacity: 0.5,
341
+ cursor: 'pointer',
342
+ axis: 'y',
343
+ update: function() {
344
+ var ordr = jQuery(this).sortable('serialize') + '&action=list_update_order';
345
+ jQuery.post(ajaxurl, ordr, function(response){
346
+ //alert(response);
347
+ });
348
+ }
349
+ });
350
+ });
351
+
352
+ </script>
353
+ <?php
354
+ }
355
+ add_action('admin_head','image_sort');
356
+
357
+ function order_list(){
358
+ global $wp_logo_slider_images;
359
+
360
+ $list = $wp_logo_slider_images;
361
+ $new_order = $_POST['list_item'];
362
+ $new_list = array();
363
+
364
+ foreach($new_order as $v){
365
+ if(isset($list[$v])){
366
+ $new_list[$v] = $list[$v];
367
+ }
368
+ }
369
+ update_option('wp_logo_slider_images',$new_list);
370
+ }
371
+ add_action('wp_ajax_list_update_order','order_list');
372
+
373
+ /*============================================================================================*/
374
+
375
+
376
  // display the settings administration code
377
  function wp_logo_settings_admin() { ?>
378
 
379
  <?php wp_logo_slider_settings_update_check(); ?>
380
+ <h2><?php _e('Wordpress Logo Slider Settings','lgs'); ?></h2>
381
  <form method="post" action="options.php">
382
  <?php settings_fields('wp_logo_slider_settings'); ?>
383
  <?php global $wp_logo_slider_settings; $options = $wp_logo_slider_settings; ?>
384
  <table class="form-table">
385
+ <tr><th scope="row"><?php _e('Size','lgs') ?></th>
386
+ <td><?php _e('Width: ','lgs') ?><input type="text" name="wp_logo_slider_settings[slider_width]" value="<?php echo $options['slider_width'] ?>" size="4" /> <?php _e('Height: ','lgs') ?><input type="text" name="wp_logo_slider_settings[slider_height]" value="<?php echo $options['slider_height'] ?>" size="4" /></td></tr>
387
 
388
+ <tr><th scope="row"><?php _e('Images Per Slide','lgs') ?></th>
389
+ <td>
390
+ <select name="wp_logo_slider_settings[num_img]">
391
+ <option value="1" <?php echo ($options['num_img'] == '1' ? 'selected="selected"' : '') ?>><?php _e('1','lgs') ?></option>
392
+ <option value="2" <?php echo ($options['num_img'] == '2' ? 'selected="selected"' : '') ?>><?php _e('2','lgs') ?></option>
393
+ <option value="3" <?php echo ($options['num_img'] == '3' ? 'selected="selected"' : '') ?>><?php _e('3','lgs') ?></option>
394
+ <option value="4" <?php echo ($options['num_img'] == '4' ? 'selected="selected"' : '') ?>><?php _e('4','lgs') ?></option>
395
+ <option value="5" <?php echo ($options['num_img'] == '5' ? 'selected="selected"' : '') ?>><?php _e('5','lgs') ?></option>
396
+ <option value="6" <?php echo ($options['num_img'] == '6' ? 'selected="selected"' : '') ?>><?php _e('6','lgs') ?></option>
397
+ <option value="7" <?php echo ($options['num_img'] == '7' ? 'selected="selected"' : '') ?>><?php _e('7','lgs') ?></option>
398
+ <option value="8" <?php echo ($options['num_img'] == '8' ? 'selected="selected"' : '') ?>><?php _e('8','lgs') ?></option>
399
+ </select> <small><?php _e('Number of logos per slide','lgs') ?></small> </td>
400
  </tr>
401
 
402
+ <tr><th scope="row"><?php _e('Background Colour','lgs') ?></th>
403
+ <td><input type="text" name="wp_logo_slider_settings[bgcolour]" value="<?php echo $options['bgcolour'] ?>" /> <small><?php _e('Format: ','lgs') ?>#FFFFFF</small></td>
404
  </tr>
405
+
406
+ <tr><th scope="row"><?php _e('Open logo links in New Window','lgs') ?></th>
407
+ <td><input type="checkbox" name="wp_logo_slider_settings[new_window]" <?php echo ($options['new_window'] == 'on' ? 'checked="checked"' : '' ) ?> /></td>
408
+ </tr>
409
+
410
+ <tr><th scope="row"><?php _e('Select Slider','lgs') ?></th>
411
+ <td>
412
+ <select name="wp_logo_slider_settings[select_slider]">
413
+ <option value="slide" <?php echo ($options['select_slider'] == 'slide' ? 'selected="selected"' : '' ) ?>><?php _e('Slide','lgs') ?></option>
414
+ <option value="fade" <?php echo ($options['select_slider'] == 'fade' ? 'selected="selected"' : '' ) ?>><?php _e('Fade','lgs') ?></option>
415
+ </select>
416
+ </td>
417
+ </tr>
418
+
419
+ <tr><th scope="row"><?php _e('Auto Slide','lgs') ?></th>
420
  <td id="arrow-style">
421
 
422
+ <?php _e('ON','lgs') ?> <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="1" <?php if($options['auto_slide']==1){echo 'checked="checked"';}?> />&nbsp; &nbsp;
423
+ <?php _e('OFF','lgs') ?> <input type="radio" name="wp_logo_slider_settings[auto_slide]" value="2" <?php if($options['auto_slide']==2){echo 'checked="checked"';}?>/>
424
  </td>
425
  </tr>
426
+ <tr><th scope="row"><?php _e('Auto Slide Time','lgs') ?></th>
427
+ <td><input type="text" name="wp_logo_slider_settings[auto_slide_time]" value="<?php echo $options['auto_slide_time'] ?>" size="4" /> <small><?php _e('Set auto slide duration in seconds','lgs') ?></small></td>
428
  </tr>
429
 
430
+ <tr><th scope="row"><?php _e('Arrow Style','lgs') ?></th>
431
  <td id="arrow-style">
432
+
433
+ <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/off.png" width="28" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="0" <?php if($options['arrow']==0){echo 'checked="checked"';}?> /></p>
434
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow1.png" width="28" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="1" <?php if($options['arrow']==1){echo 'checked="checked"';}?> /></p>
435
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow2.png" width="31" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="2" <?php if($options['arrow']==2){echo 'checked="checked"';}?>/></p>
436
  <p><img src="<?php echo plugin_dir_url(__FILE__); ?>/arrows/arrow3.png" width="34" height="40" alt="" /><br /><input type="radio" name="wp_logo_slider_settings[arrow]" value="3" <?php if($options['arrow']==3){echo 'checked="checked"';}?>/></p>
441
 
442
  </td>
443
  </tr>
444
+ <tr valign="top"><th scope="row"><?php _e('Custom CSS','lgs') ?></th>
445
  <td><textarea name="wp_logo_slider_settings[custom_css]" rows="6" cols="70"><?php echo $options['custom_css']; ?></textarea></td>
446
  </tr>
447
  <input type="hidden" name="wp_logo_slider_settings[update]" value="UPDATED" />
448
 
449
  </table>
450
  <p class="submit">
451
+ <input type="submit" class="button-primary" value="<?php _e('Save Settings','lgs') ?>" />
452
  </form>
453
 
454
  <!-- The Reset Option -->
459
  <input type="hidden" name="wp_logo_slider_settings[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
460
  <?php endforeach; ?>
461
  <input type="hidden" name="wp_logo_slider_settings[update]" value="RESET" />
462
+ <input type="submit" class="button" value="<?php _e('Reset Settings','lgs') ?>" />
463
  </form>
464
  <!-- End Reset Option -->
465
  </p>
515
  $newline = "\n"; // line break
516
  echo '<div id="logo-slider-wraper">';
517
 
518
+ $check = $wp_logo_slider_settings['new_window'];
519
 
520
+ $new_window = '';
521
+
522
+ if(isset($check))
523
+ {
524
+ $new_window = 'target="_blank"';
525
+ }
526
+ else
527
+ {
528
+ $new_window = 'target="_parent"';
529
+ }
530
+
531
+ $img_num1 = 1;
532
+ $img_num2 = 2;
533
+ $img_num3 = 3;
534
+ $img_num4 = 4;
535
+
536
+ $num_img = $wp_logo_slider_settings['num_img'];
537
+
538
+ // Get web and other device engins for Responsive
539
+ $iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
540
+ $iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
541
+ $iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
542
+ $Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android");
543
+ $webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
544
+ $mobile = stripos($_SERVER['HTTP_USER_AGENT'],"mobile");
545
+ $BlackBerry = stripos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
546
+ $RimTablet= stripos($_SERVER['HTTP_USER_AGENT'],"RIM Tablet");
547
+
548
+ $msie = strpos($_SERVER["HTTP_USER_AGENT"], 'MSIE');
549
+ $firefox = strpos($_SERVER["HTTP_USER_AGENT"], 'Firefox');
550
+ $safari = strpos($_SERVER["HTTP_USER_AGENT"], 'Safari');
551
+ $chrome = strpos($_SERVER["HTTP_USER_AGENT"], 'Chrome');
552
+ $Opera = strpos($_SERVER["HTTP_USER_AGENT"], 'OPR');
553
+ $IE11 = strpos($_SERVER["HTTP_USER_AGENT"], 'rv:11.0');
554
+
555
+ if( $iPod || $iPhone ){
556
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
557
+ }else if($iPad){
558
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
559
+ }else if($Android){
560
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
561
+ }else if($webOS){
562
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
563
+ }else if($mobile){
564
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
565
+ }else if($BlackBerry){
566
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num1);
567
+ }else if($RimTablet){
568
+ $data_chunks = array_chunk($wp_logo_slider_images, $img_num4);
569
+ }else if(($msie) || ($firefox) || ($safari) || ($chrome) || ($IE11)){
570
+ $data_chunks = array_chunk($wp_logo_slider_images, $num_img);
571
+ }
572
+
573
+ // Logo Image Slider
574
  echo '<ul id="logo-slider">';
575
+
576
  foreach ($data_chunks as $data_chunk) {
577
  echo '<li class="slide">';
578
  foreach($data_chunk as $data) {
579
+ if($data['image_links_to'])
580
+ echo '<a href="'.$data['image_links_to'].'" '.$new_window.'>';
581
+ echo '<img src="'.$data['file_url'].'" class="logo-img" alt="" />';
582
+ if($data['image_links_to'])
583
+ echo '</a>';
 
584
  }
585
  echo '</li>';
586
  }
613
  add_action('wp_footer', 'wp_slider_args', 15);
614
  function wp_slider_args() {
615
  global $wp_logo_slider_settings; ?>
616
+
617
+
618
  <script type="text/javascript">
619
  jQuery(document).ready(function($) {
620
+ $('#logo-slider')
621
+ <?php
622
+ if($wp_logo_slider_settings['arrow'] == '0')
623
+ {
624
+ echo '';
625
+ }
626
+ else
627
+ {
628
+ ?>
629
+ .before('<div class="slider-controls"><a href="#" id="prev">&lt;</a> <a href="#" id="next">&gt;</a></div>')
630
+ <?php
631
+ }
632
+ ?>
633
+ .cycle({
634
  timeout: <?php if($wp_logo_slider_settings['auto_slide'] == 1) {echo $wp_logo_slider_settings['auto_slide_time'] * 1000;} else { echo 0;} ?>,
635
+ <?php
636
+ $slid = $wp_logo_slider_settings['select_slider'];
637
+
638
+ if($slid == 'slide')
639
+ {
640
+ ?>
641
  fx: 'scrollHorz',
642
+ <?php
643
+ }
644
+ else if($slid == 'fade')
645
+ {
646
+ ?>
647
+ fx: 'fade',
648
+ <?php
649
+ }
650
+ else
651
+ {
652
+ ?>
653
+ fx: 'scrollHorz',
654
+ <?php
655
+ }
656
+ ?>
657
  next: '#prev',
658
  prev: '#next',
659
  });
668
  global $wp_logo_slider_settings;
669
  global $options;
670
  ?>
671
+
672
  <style type="text/css" media="screen">
673
  <?php
674
  echo $wp_logo_slider_settings['custom_css'];
680
  .slider-controls{
681
  position:relative;
682
  width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px;
683
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px !important;
 
684
  }
685
  #logo-slider {
686
  position: relative;
689
  margin: 0; padding: 0;
690
  overflow: hidden;
691
  list-style:none;
692
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
693
  }
694
  .slide{
695
  list-style:none;
712
  float:left;
713
  margin-left:-50px
714
  }
715
+
716
+ /*
717
+ ===============================================================
718
+ --------------------_ Responsive _--------------------
719
+ ===============================================================
720
+ */
721
+
722
+ @media screen and (max-width:320px){
723
+ #logo-slider-wraper{
724
+ position:relative !important;
725
+ width:52% !important;
726
+ left:42px;
727
+ }
728
+ .slider-controls {
729
+ position: relative;
730
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
731
+ left:30px;
732
+ width: 100% !important;
733
+ }
734
+ #logo-slider {
735
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
736
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
737
+ list-style: none outside none;
738
+ margin: 0;
739
+ overflow: hidden;
740
+ padding: 0;
741
+ position: relative;
742
+ width: 110% !important;
743
+ }
744
+ .slide {
745
+ list-style: none outside none;
746
+ margin: 0 !important;
747
+ width: 100% !important;
748
+ }
749
+ #next{
750
+ background:url(<?php echo WP_CONTENT_URL.'/plugins/logo-slider/arrows/arrow'. $wp_logo_slider_settings['arrow'].'-prev.png'; ?>) no-repeat center;
751
+ float:left;
752
+ margin-left:-66px !important;
753
+ }
754
+ .logo-img {
755
+ margin-left:32px;
756
+ }
757
+ }
758
+ @media screen and (min-width:321px) and (max-width:480px){
759
+ #logo-slider-wraper{
760
+ position:relative;
761
+ width:35% !important;
762
+ left:55px !important;
763
+ }
764
+ .slider-controls {
765
+ position: relative;
766
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
767
+ width: 100% !important;
768
+ }
769
+ #logo-slider {
770
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
771
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
772
+ list-style: none outside none;
773
+ margin: 0;
774
+ overflow: hidden;
775
+ padding: 0;
776
+ position: relative;
777
+ width: 102% !important;
778
+ }
779
+ .slide {
780
+ list-style: none outside none;
781
+ margin: 0 !important;
782
+ width: 100% !important;
783
+ }
784
+ }
785
+ @media screen and (min-width:321px) and (max-width:360px){
786
+ #logo-slider-wraper{
787
+ position:relative;
788
+ width:50% !important;
789
+ }
790
+ .slider-controls {
791
+ position: relative;
792
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
793
+ width: 100% !important;
794
+ }
795
+ #logo-slider {
796
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
797
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
798
+ list-style: none outside none;
799
+ margin: 0;
800
+ overflow: hidden;
801
+ padding: 0;
802
+ position: relative;
803
+ width: 100% !important;
804
+ }
805
+ .slide {
806
+ list-style: none outside none;
807
+ margin: 0 !important;
808
+ width: 100% !important;
809
+ }
810
+ }
811
+ @media screen and (min-width:481px) and (max-width:640px){
812
+ #logo-slider-wraper{
813
+ position:relative;
814
+ width:28% !important;
815
+ left:34px !important
816
+ }
817
+ .slider-controls {
818
+ position: relative;
819
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
820
+ width: 100% !important;
821
+ }
822
+ #logo-slider {
823
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
824
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
825
+ list-style: none outside none;
826
+ margin: 0;
827
+ overflow: hidden;
828
+ padding: 0;
829
+ position: relative;
830
+ width: 100% !important;
831
+ }
832
+ .slide {
833
+ list-style: none outside none;
834
+ margin: 0 !important;
835
+ width: 100% !important;
836
+ }
837
+ }
838
+ @media only screen and (min-width:641px) and (max-width:768px){
839
+ #logo-slider-wraper{
840
+ position:relative;
841
+ width:78% !important;
842
+ left:34px !important
843
+ }
844
+ .slider-controls {
845
+ position: relative;
846
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
847
+ width: 100% !important;
848
+ }
849
+ #logo-slider {
850
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
851
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
852
+ list-style: none outside none;
853
+ margin: 0;
854
+ overflow: hidden;
855
+ padding: 0;
856
+ position: relative;
857
+ width: 100% !important;
858
+ left:-12px;
859
+ }
860
+ .slide {
861
+ list-style: none outside none;
862
+ margin: 0 !important;
863
+ width: 100% !important;
864
+ }
865
+ }
866
+ @media only screen and (min-width:770px){
867
+ #logo-slider-wraper{
868
+ position:relative;
869
+ width:<?php echo $wp_logo_slider_settings['slider_width']; ?>px !important;
870
+ left:34px !important
871
+ }
872
+ .slider-controls {
873
+ position: relative;
874
+ top: <?php echo $wp_logo_slider_settings['slider_height'] / 2 - 19 ?>px;
875
+ width: 100% !important;
876
+ }
877
+ #logo-slider {
878
+ background:<?php echo $wp_logo_slider_settings['bgcolour']; ?>;
879
+ height: <?php echo $wp_logo_slider_settings['slider_height']?>px;
880
+ list-style: none outside none;
881
+ margin: 0;
882
+ overflow: hidden;
883
+ padding: 0;
884
+ position: relative;
885
+ width: 100% !important;
886
+ }
887
+ .slide {
888
+ list-style: none outside none;
889
+ margin: 0 !important;
890
+ width: <?php echo $wp_logo_slider_settings['slider_width']; ?>px !important;
891
+ }
892
+ }
893
+
894
  </style>
895
 
896
  <?php }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: EnigmaWeb
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEJ9HFWJ94BG4
4
  Tags: logo slide, logo slideshow, logo slide show, logo carousel, image carousel, logo slider, sponsors, logo showcase
5
  Requires at least: 3.1
6
- Tested up to: 3.5.1
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,14 +12,16 @@ Showcase logos in stylish slideshow carousel.
12
 
13
  == Description ==
14
 
15
- Add a logo slideshow carousel to your site quickly and easily. Embed in any post/page using shortcode `[logo-slider]` or in your theme with `<?php logo_slider(); ?>`
16
 
17
  Perfect for displaying a list of sponsor or client logos.
18
 
19
  = Features =
20
  * Simple and light weight
 
 
21
  * Nice selection of arrow icons
22
- * Easy to customise (height, width, number of images before slide etc)
23
  * Easy image uploader
24
  * Ability to add links to each logo if you want
25
  * Auto-slide option
@@ -37,6 +39,14 @@ Perfect for displaying a list of sponsor or client logos.
37
 
38
  == Frequently Asked Questions ==
39
 
 
 
 
 
 
 
 
 
40
  = How can I customise the design? =
41
 
42
  You can do some basic presentation adjustments via Logo Slider tab on the admin menu. Beyond this, you can completely customise the design using CSS in the Custom CSS field on settings screen.
@@ -56,6 +66,27 @@ If you've tried all the obvious stuff and it's still not working please request
56
 
57
  == Changelog ==
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  = 1.1 =
60
  * Added auto-slide options
61
 
@@ -64,6 +95,27 @@ If you've tried all the obvious stuff and it's still not working please request
64
 
65
  == Upgrade Notice ==
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  = 1.1 =
68
  * Added auto-slide options
69
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CEJ9HFWJ94BG4
4
  Tags: logo slide, logo slideshow, logo slide show, logo carousel, image carousel, logo slider, sponsors, logo showcase
5
  Requires at least: 3.1
6
+ Tested up to: 3.8.1
7
  Stable tag: trunk
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
  == Description ==
14
 
15
+ Add a reponsive logo slideshow carousel to your site quickly and easily. Embed in any post/page using shortcode `[logo-slider]` or in your theme `<?php logo_slider(); ?>`
16
 
17
  Perfect for displaying a list of sponsor or client logos.
18
 
19
  = Features =
20
  * Simple and light weight
21
+ * Fully responsive
22
+ * Drag & Drop to reorder slider
23
  * Nice selection of arrow icons
24
+ * Easy to customise (height, width, transition type etc)
25
  * Easy image uploader
26
  * Ability to add links to each logo if you want
27
  * Auto-slide option
39
 
40
  == Frequently Asked Questions ==
41
 
42
+ = How can I use this in a widget? =
43
+
44
+ Just place the shortcode into a text widget. If that doesn't work (it just renders [logo-slider] in text) then that means your theme isn't 'widgetized' which you can fix easily by adding 1 tiny piece of code to your theme functions.php:
45
+
46
+ `add_filter('widget_text', 'do_shortcode');`
47
+
48
+ Add this code above to fuctions.php between the `<?php` and `?>` tags. A good place would be either at the very top or the very bottom of the file. Once you've done this you should be able to use shortcode in widgets now.
49
+
50
  = How can I customise the design? =
51
 
52
  You can do some basic presentation adjustments via Logo Slider tab on the admin menu. Beyond this, you can completely customise the design using CSS in the Custom CSS field on settings screen.
66
 
67
  == Changelog ==
68
 
69
+ = 1.4.2 =
70
+ * Fix for IE 11
71
+ * Added option for 1 or 2 images per slide (so 3 is no longer lowest option)
72
+
73
+ = 1.4.1 =
74
+ * Fixed number of slides bug (was stuck on 4). Field is now re-implemented so you can set number of logos per slide on desktop layout.
75
+
76
+ = 1.4 =
77
+ * Now fully responsive
78
+ * Drag & Drop to reorder slider
79
+ * Open slide link in new window
80
+ * Turn arrows On/Off
81
+ * Fade transition as an option
82
+ * Internationalization
83
+
84
+ = 1.3 =
85
+ * Fixed background colour setting
86
+
87
+ = 1.2 =
88
+ * Bug fix for configuration menu display and image resize function. Thanks to Grant Kimball for this fix.
89
+
90
  = 1.1 =
91
  * Added auto-slide options
92
 
95
 
96
  == Upgrade Notice ==
97
 
98
+ = 1.4.2 =
99
+ * Fix for IE 11
100
+ * Added option for 1 or 2 images per slide (so 3 is no longer lowest option)
101
+
102
+ = 1.4.1 =
103
+ * Fixed number of slides bug (was stuck on 4). Field is now re-implemented so you can set number of logos per slide on desktop layout.
104
+
105
+ = 1.4 =
106
+ * Now fully responsive
107
+ * Drag & Drop to reorder slider
108
+ * Open slide link in new window
109
+ * Turn arrows On/Off
110
+ * Fade transition as an option
111
+ * Internationalization
112
+
113
+ = 1.3 =
114
+ * Fixed background colour setting
115
+
116
+ = 1.2 =
117
+ * Bug fix for configuration menu display and image resize function. Thanks to Grant Kimball for this fix.
118
+
119
  = 1.1 =
120
  * Added auto-slide options
121
 
screenshot-2.jpg CHANGED
Binary file