WP Logo Showcase Responsive Slider - Version 1.1

Version Description

  • Fixed some bugs
  • Add link for logo
  • Added new shortcode parameter "link_target"
Download this release

Release Info

Developer anoopranawat
Plugin Icon 128x128 WP Logo Showcase Responsive Slider
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

assets/css/logo-showcase.css CHANGED
@@ -1,9 +1,10 @@
1
- .logo_showcase{padding:0 30px 20px 30px !important; margin:0 !important; text-align:center;}
2
  .logo_showcase .slick-arrow { top:30% !important;}
3
  .logo_showcase .slick-next{right:0px !important;}
4
  .logo_showcase .slick-prev{ left:0px !important}
5
  .logo_showcase .slick-dots{left:15px !important; right:15px !important; text-align:center; bottom:-10px !important;}
6
 
 
7
  .logo_showcase .slick-slide{ padding:0 15px; text-align:center !important; color: #fff; display: inline-block !important; float:none !important; vertical-align: middle !important; }
8
  .logo_showcase .slick-arrow{display: none; }
9
  .logo_showcase.center .slick-slide img{opacity: 0.5;transform: scale(0.5);transition: all 300ms ease 0s;}
1
+ .logo_showcase{padding:0 30px 20px 30px !important; margin:0 !important; text-align:center; clear:both;}
2
  .logo_showcase .slick-arrow { top:30% !important;}
3
  .logo_showcase .slick-next{right:0px !important;}
4
  .logo_showcase .slick-prev{ left:0px !important}
5
  .logo_showcase .slick-dots{left:15px !important; right:15px !important; text-align:center; bottom:-10px !important;}
6
 
7
+ .logo_showcase .slick-slide img{display:inline-block !important}
8
  .logo_showcase .slick-slide{ padding:0 15px; text-align:center !important; color: #fff; display: inline-block !important; float:none !important; vertical-align: middle !important; }
9
  .logo_showcase .slick-arrow{display: none; }
10
  .logo_showcase.center .slick-slide img{opacity: 0.5;transform: scale(0.5);transition: all 300ms ease 0s;}
includes/logo-showcase-functions.php CHANGED
@@ -33,7 +33,7 @@ function wplss_logo_showcase_post_types() {
33
  'capability_type' => 'post',
34
  'has_archive' => true,
35
  'hierarchical' => false,
36
- 'supports' => array('title','editor','thumbnail')
37
 
38
  );
39
  register_post_type( 'logoshowcase', apply_filters( 'sp_logoshowcase_post_type_args', $sp_logoshowcase_args ) );
@@ -73,10 +73,48 @@ function wplss_logo_showcase_taxonomies() {
73
 
74
  }
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  /*
79
- * Add [logoshowcase limit ="-1" category="-1"] shortcode
80
  *
81
  */
82
 
@@ -95,6 +133,7 @@ function wplss_logoshowcase_shortcode( $atts) {
95
  "speed" => '',
96
  "center_mode" => '',
97
  "loop" => '',
 
98
 
99
  ), $atts));
100
 
@@ -167,6 +206,11 @@ function wplss_logoshowcase_shortcode( $atts) {
167
  } else {
168
  $showcase_loop = 'true';
169
  }
 
 
 
 
 
170
 
171
  ob_start();
172
 
@@ -191,12 +235,15 @@ function wplss_logoshowcase_shortcode( $atts) {
191
  <?php if($showcase_cat_name != '') { ?>
192
  <h2><?php echo $showcase_cat_name; ?> </h2>
193
  <?php } ?>
194
- <ul class="logo_showcase showcase_<?php echo $cat; ?> <?php if($showcase_center_mode == "true") { echo 'center'; } ?>">
195
  <?php
196
  while ($query->have_posts()) : $query->the_post();
197
  $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
198
  <li>
199
- <?php the_post_thumbnail( 'medium' ); ?>
 
 
 
200
 
201
  </li>
202
  <?php endwhile; ?>
@@ -204,15 +251,13 @@ function wplss_logoshowcase_shortcode( $atts) {
204
 
205
  <?php wp_reset_query(); ?>
206
 
207
- <script>
208
- //[logoshowcase limit ="-1" cat_id="15" slides_column="4" slides_scroll="1" autoplay="false" center_mode="false"]
209
- //[logoshowcase limit ="-1" cat_id="16" slides_column="3" slides_scroll="2" autoplay="false" center_mode="true"]
210
-
211
- jQuery(document).ready(function(){
212
-
213
-
214
-
215
- jQuery('.showcase_<?php echo $cat; ?>').slick({
216
  centerMode: <?php echo $showcase_center_mode; ?>,
217
  dots: <?php echo $showcase_dots; ?>,
218
  infinite: <?php echo $showcase_loop; ?>,
@@ -234,7 +279,7 @@ function wplss_logoshowcase_shortcode( $atts) {
234
  }
235
  },
236
  {
237
- breakpoint: 600,
238
  settings: {
239
  slidesToShow: 2,
240
  slidesToScroll: 2
33
  'capability_type' => 'post',
34
  'has_archive' => true,
35
  'hierarchical' => false,
36
+ 'supports' => array('title','thumbnail')
37
 
38
  );
39
  register_post_type( 'logoshowcase', apply_filters( 'sp_logoshowcase_post_type_args', $sp_logoshowcase_args ) );
73
 
74
  }
75
 
76
+ /* Custom meta box for slider link */
77
+ function wplss_add_meta_box() {
78
+ add_meta_box('custom-metabox',__( 'Add Link URL for Logo', 'link_textdomain' ),'wplss_box_callback','logoshowcase');
79
+ }
80
+ add_action( 'add_meta_boxes', 'wplss_add_meta_box' );
81
+ function wplss_box_callback( $post ) {
82
+ wp_nonce_field( 'wplss_save_meta_box_data', 'wplss_meta_box_nonce' );
83
+ $value = get_post_meta( $post->ID, 'wplss_slide_link', true );
84
+ echo '<input type="url" id="wplss_slide_link" name="wplss_slide_link" value="' . esc_attr( $value ) . '" size="25" /><br />';
85
+ echo 'ie http://www.google.com';
86
+ }
87
+ function wplss_save_meta_box_data( $post_id ) {
88
+ if ( ! isset( $_POST['wplss_meta_box_nonce'] ) ) {
89
+ return;
90
+ }
91
+ if ( ! wp_verify_nonce( $_POST['wplss_meta_box_nonce'], 'wplss_save_meta_box_data' ) ) {
92
+ return;
93
+ }
94
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
95
+ return;
96
+ }
97
+ if ( isset( $_POST['post_type'] ) && 'logoshowcase' == $_POST['post_type'] ) {
98
+
99
+ if ( ! current_user_can( 'edit_page', $post_id ) ) {
100
+ return;
101
+ }
102
+ } else {
103
 
104
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
105
+ return;
106
+ }
107
+ }
108
+ if ( ! isset( $_POST['wplss_slide_link'] ) ) {
109
+ return;
110
+ }
111
+ $link_data = sanitize_text_field( $_POST['wplss_slide_link'] );
112
+ update_post_meta( $post_id, 'wplss_slide_link', $link_data );
113
+ }
114
+ add_action( 'save_post', 'wplss_save_meta_box_data' );
115
 
116
  /*
117
+ * Add [logoshowcase limit ="-1"] shortcode
118
  *
119
  */
120
 
133
  "speed" => '',
134
  "center_mode" => '',
135
  "loop" => '',
136
+ "link_target" => '',
137
 
138
  ), $atts));
139
 
206
  } else {
207
  $showcase_loop = 'true';
208
  }
209
+ if( $link_target ) {
210
+ $linkTarget = $link_target;
211
+ } else {
212
+ $linkTarget = '';
213
+ }
214
 
215
  ob_start();
216
 
235
  <?php if($showcase_cat_name != '') { ?>
236
  <h2><?php echo $showcase_cat_name; ?> </h2>
237
  <?php } ?>
238
+ <ul class="logo_showcase showcase_<?php echo $cat; ?> <?php if($showcase_center_mode == "true") { echo 'center'; } else { echo 'nocenter'; } ?>">
239
  <?php
240
  while ($query->have_posts()) : $query->the_post();
241
  $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
242
  <li>
243
+ <?php $logourl = get_post_meta( get_the_ID(),'wplss_slide_link', true );
244
+ if ($logourl != '') { ?>
245
+ <a href="<?php echo $logourl; ?>" <?php if($linkTarget == 'blank') { ?> target="_blank" <?php } ?>><?php the_post_thumbnail( 'url' ); ?> </a>
246
+ <?php } else { the_post_thumbnail( 'url' );} ?>
247
 
248
  </li>
249
  <?php endwhile; ?>
251
 
252
  <?php wp_reset_query(); ?>
253
 
254
+ <script>
255
+ jQuery(document).ready(function(){
256
+ <?php if($showcase_center_mode == "true") { ?>
257
+ jQuery('.showcase_<?php echo $cat; ?>.center').slick({
258
+ <?php } else { ?>
259
+ jQuery('.showcase_<?php echo $cat; ?>.nocenter').slick({
260
+ <?php } ?>
 
 
261
  centerMode: <?php echo $showcase_center_mode; ?>,
262
  dots: <?php echo $showcase_dots; ?>,
263
  infinite: <?php echo $showcase_loop; ?>,
279
  }
280
  },
281
  {
282
+ breakpoint: 640,
283
  settings: {
284
  slidesToShow: 2,
285
  slidesToScroll: 2
logo-showcase.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.wponlinesupport.com/
5
  * Description: Easy to add and display Logo Showcase Responsive Slider on your website.
6
  * Author: WP Online Support
7
- * Version: 1.0
8
  * Author URI: http://www.wponlinesupport.com/
9
  *
10
  * @package WordPress
4
  * Plugin URI: http://www.wponlinesupport.com/
5
  * Description: Easy to add and display Logo Showcase Responsive Slider on your website.
6
  * Author: WP Online Support
7
+ * Version: 1.1
8
  * Author URI: http://www.wponlinesupport.com/
9
  *
10
  * @package WordPress
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: logo slider, widget , client logo carousel, client logo slider, client, customer, image carousel, carousel, logo showcase, Responsive logo slider, Responsive logo carousel, WordPress logo slider, WordPress logo carousel, slick carousel
4
  Requires at least: 3.1
5
- Tested up to: 4.3
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -19,15 +19,16 @@ View [DEMO](http://demo.wponlinesupport.com/logo-slider-plugin-demo/) for additi
19
  = Here is the shortcode example =
20
  <code>[logoshowcase]</code>
21
 
22
- = If you want to display Testimonial by category then use this short code =
23
  <code>[logoshowcase limit ="-1" cat_id="category_ID"</code>
24
 
25
  = Complete shortcode with all parameters =
26
- <code>[logoshowcase limit ="-1" cat_id="15" cat_name="Support" dots="true" arrows="true" slides_column="3" slides_scroll="2" autoplay="true"
27
- autoplay_interval="300" speed="2000" loop="true" center_mode="true"]</code>
 
28
 
29
 
30
- = Use Following Testimonial parameters with shortcode =
31
  <code>[logoshowcase]</code>
32
  * **limit:**
33
  [logoshowcase limit="5"] ( ie Display 5 Logo on your website )
@@ -49,10 +50,14 @@ autoplay_interval="300" speed="2000" loop="true" center_mode="true"]</code>
49
  [logoshowcase loop="true"] ( Display slider in Loop OR not : You can use "true" OR "false")
50
  * **Center Mode:**
51
  [logoshowcase center_mode="false"] ( Display slider in Center Mode OR not : You can use "true" OR "false")
 
 
52
 
53
  = Features include: =
54
  * Display Client logoshowcase in slider view.
55
  * Display Client logoshowcase categories wise.
 
 
56
 
57
 
58
  == Installation ==
@@ -72,6 +77,11 @@ autoplay_interval="300" speed="2000" loop="true" center_mode="true"]</code>
72
 
73
  == Changelog ==
74
 
 
 
 
 
 
75
  = 1.0 =
76
  * Initial release
77
  * Adds custom post type
@@ -79,5 +89,10 @@ autoplay_interval="300" speed="2000" loop="true" center_mode="true"]</code>
79
 
80
  == Upgrade Notice ==
81
 
 
 
 
 
 
82
  = 1.0 =
83
  * Initial releasend
2
  Contributors: wponlinesupport, anoopranawat
3
  Tags: logo slider, widget , client logo carousel, client logo slider, client, customer, image carousel, carousel, logo showcase, Responsive logo slider, Responsive logo carousel, WordPress logo slider, WordPress logo carousel, slick carousel
4
  Requires at least: 3.1
5
+ Tested up to: 4.4.1
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
19
  = Here is the shortcode example =
20
  <code>[logoshowcase]</code>
21
 
22
+ = If you want to display Logos by category then use this short code =
23
  <code>[logoshowcase limit ="-1" cat_id="category_ID"</code>
24
 
25
  = Complete shortcode with all parameters =
26
+ <code>[logoshowcase limit ="-1" cat_id="15" cat_name="Support" dots="true" arrows="true"
27
+ slides_column="3" slides_scroll="2" autoplay="true" autoplay_interval="300" speed="2000"
28
+ loop="true" center_mode="true" link_target="blank"]</code>
29
 
30
 
31
+ = Use Following parameters with shortcode =
32
  <code>[logoshowcase]</code>
33
  * **limit:**
34
  [logoshowcase limit="5"] ( ie Display 5 Logo on your website )
50
  [logoshowcase loop="true"] ( Display slider in Loop OR not : You can use "true" OR "false")
51
  * **Center Mode:**
52
  [logoshowcase center_mode="false"] ( Display slider in Center Mode OR not : You can use "true" OR "false")
53
+ * **link_target:**
54
+ [logoshowcase link_target="blank"] (Open link on the same Tab OR other Tab. Values are "blank" and "self")
55
 
56
  = Features include: =
57
  * Display Client logoshowcase in slider view.
58
  * Display Client logoshowcase categories wise.
59
+ * Add Link for image.
60
+ * Target "blank" OR "self" when user click on link
61
 
62
 
63
  == Installation ==
77
 
78
  == Changelog ==
79
 
80
+ = 1.1 =
81
+ * Fixed some bugs
82
+ * Add link for logo
83
+ * Added new shortcode parameter "link_target"
84
+
85
  = 1.0 =
86
  * Initial release
87
  * Adds custom post type
89
 
90
  == Upgrade Notice ==
91
 
92
+ = 1.1 =
93
+ * Fixed some bugs
94
+ * Add link for logo
95
+ * Added new shortcode parameter "link_target"
96
+
97
  = 1.0 =
98
  * Initial releasend