Fruitful Shortcodes - Version 1.4.1

Version Description

Release Date 22.12.2015

  • New features

    • Attributes for recent posts shortcodes
  • Bugfixes

    • Change random id value to static
    • CSS fix
Download this release

Release Info

Developer fruitfulcode
Plugin Icon 128x128 Fruitful Shortcodes
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4 to 1.4.1

ff-shortcodes.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Fruitful Shortcodes
4
  Plugin URI: http://plugins.fruitfulcode.com/shortcodes/
5
  Description: Add additional content shortcodes: horizontal tabs, vertical tabs, accordion, promo text, columns, infobox, separator, alert, progress bar, button, recent post, recent news
6
- Version: 1.4
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
3
  Plugin Name: Fruitful Shortcodes
4
  Plugin URI: http://plugins.fruitfulcode.com/shortcodes/
5
  Description: Add additional content shortcodes: horizontal tabs, vertical tabs, accordion, promo text, columns, infobox, separator, alert, progress bar, button, recent post, recent news
6
+ Version: 1.4.1
7
  Author: fruitfulcode
8
  Author URI: http://fruitfulcode.com
9
  License: GPL2
includes/admin/tinymce/ffs.tinymce.js CHANGED
@@ -285,7 +285,7 @@
285
  title : 'Add recent posts',
286
  image : url+'/recent_news.png',
287
  onclick : function() {
288
- ed.selection.setContent('[fruitful_recent_posts]');
289
  }
290
  });
291
  },
@@ -306,7 +306,7 @@
306
  title : 'Add recent posts slider',
307
  image : url+'/recent_news_slider.png',
308
  onclick : function() {
309
- ed.selection.setContent('[fruitful_recent_posts_slider]');
310
  }
311
  });
312
  },
285
  title : 'Add recent posts',
286
  image : url+'/recent_news.png',
287
  onclick : function() {
288
+ ed.selection.setContent('[fruitful_recent_posts posts="4" cat="" excerpt="0"]');
289
  }
290
  });
291
  },
306
  title : 'Add recent posts slider',
307
  image : url+'/recent_news_slider.png',
308
  onclick : function() {
309
+ ed.selection.setContent('[fruitful_recent_posts_slider posts="4" cat="" excerpt="0"]');
310
  }
311
  });
312
  },
includes/shortcodes/css/original.css CHANGED
@@ -1 +1 @@
1
- .row,.clearfix{zoom:1}.clearfix:before,.clearfix:after,.row:before,.row:after{content:'';display:block;overflow:hidden;visibility:hidden;width:0;height:0}.ffs-two-one{width:48%}.ffs-three-one{width:30.66%}.ffs-three-two{width:65.33%}.ffs-four-one{width:22%}.ffs-four-two{width:48%}.ffs-four-three{width:74%}.ffs-five-one{width:16.8%}.ffs-five-two{width:37.6%}.ffs-five-three{width:58.4%}.ffs-five-four{width:67.2%}.ffs-six-one{width:13.33%}.ffs-six-two{width:30.66%}.ffs-six-three{width:47.99%}.ffs-six-four{width:65.33%}.ffs-six-five{width:82.67%}.ffs-two-one,.ffs-three-one,.ffs-three-two,.ffs-four-one,.ffs-four-two,.ffs-four-three,.ffs-five-one,.ffs-five-two,.ffs-five-three,.ffs-five-four,.ffs-six-one,.ffs-six-two,.ffs-six-three,.ffs-six-four,.ffs-six-five{float:left;margin-right:4%;margin-bottom:4%;position:relative}.last{clear:right;margin-right:0 !important}@media only screen and (max-width:768px){.ffs-two-one,.ffs-three-one,.ffs-three-two,.ffs-four-one,.ffs-four-two,.ffs-four-three,.ffs-five-one,.ffs-five-two,.ffs-five-three,.ffs-five-four,.ffs-six-one,.ffs-six-two,.ffs-six-three,.ffs-six-four,.ffs-six-five{margin-right:0;width:100% !important}}.info-box-row{display:block;float:left;margin:30px 0 25px;width:100%}.info-box-row .ffs-info-box .infobox-title{margin:0 0 5px;font-weight:300}.info-box-row .ffs-info-box .infobox-text{padding:0}.info-box-row .ffs-info-box img.icon{display:block;min-height:51px;margin:0 auto 15px;min-width:51px}.info-box-row .ffs-info-box .ffs-icon-container{text-align:center;margin:0 auto;display:block;width:auto}.info-box-row .ffs-info-box .ffs-icon-container i{text-align:center;font-size:26px;padding:10px;margin:5px 0}.ffs-info-box.center .ffs-icon-box,.ffs-info-box.center .ffs-content-box{width:100%}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-icon-box{width:20%;display:block}.ffs-info-box.left .ffs-content-box,.ffs-info-box.right .ffs-content-box{width:80%;display:block}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-content-box{float:left}.ffs-info-box.right .ffs-icon-box,.ffs-info-box.left .ffs-content-box{float:right}.btn .ffs-icon-container{font-size:inherit}.btn .ffs-icon-container.left{padding:0 8px 0 0;text-align:left}.btn .ffs-icon-container.right{padding:0 0 0 8px;text-align:right}.fruitful_description_box{position:relative;z-index:0}.fruitful_description{float:left;width:100%;min-height:50px;margin:10px 0 20px 0;position:relative;display:block;background:#fff}.fruitful_description.shadow-type-4:before,.fruitful_description.shadow-type-5:before{position:absolute;width:80%;height:45%;left:10%;border-radius:50%;z-index:-1;top:0;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 -2px 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-4:after,.fruitful_description.shadow-type-5:after{position:absolute;width:80%;height:45%;left:10%;border-radius:50%;z-index:-1;bottom:0;content:"";-moz-box-shadow:0 2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 2px 16px rgba(0,0,0,0.4);box-shadow:0 2px 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-1:before,.fruitful_description.shadow-type-1:after{display:none}.fruitful_description.shadow-type-1 .top_line{z-index:2;display:block;width:100%;height:15px;overflow:hidden;position:absolute;top:0;left:0}.fruitful_description.shadow-type-1 .top_line:before,.fruitful_description.shadow-type-1 .top_line:after{z-index:1;position:absolute;content:"";top:-20px;left:10px;width:50%;bottom:31px;max-width:300px;background:#777;-webkit-box-shadow:0 13px 16px #777;-moz-box-shadow:0 13px 16px #777;box-shadow:0 13px 16px #777;-webkit-transform:rotate(-1.5deg);-moz-transform:rotate(-1.5deg);-o-transform:rotate(-1.5deg);-ms-transform:rotate(-1.5deg);transform:rotate(-1.5deg)}.fruitful_description.shadow-type-1 .top_line:after{-webkit-transform:rotate(1.5deg);-moz-transform:rotate(1.5deg);-o-transform:rotate(1.5deg);-ms-transform:rotate(1.5deg);transform:rotate(1.5deg);right:10px;left:auto}.fruitful_description.shadow-type-1 .bottom_line{z-index:2;display:block;width:100%;height:15px;overflow:hidden;position:absolute;bottom:0;left:0}.fruitful_description.shadow-type-1 .bottom_line:before,.fruitful_description.shadow-type-1 .bottom_line:after{z-index:1;position:absolute;content:"";top:31px;left:10px;width:50%;bottom:-20px;max-width:300px;background:#777;-webkit-box-shadow:0 -13px 16px #777;box-shadow:0 -13px 16px #777;-webkit-transform:rotate(1.5deg);-moz-transform:rotate(1.5deg);-o-transform:rotate(1.5deg);-ms-transform:rotate(1.5deg);transform:rotate(1.5deg)}.fruitful_description.shadow-type-1 .bottom_line:after{-webkit-transform:rotate(-1.5deg);-moz-transform:rotate(-1.5deg);-o-transform:rotate(-1.5deg);-ms-transform:rotate(-1.5deg);transform:rotate(-1.5deg);right:10px;left:auto}.fruitful_description.shadow-type-2:before,.fruitful_description.shadow-type-2:after{display:none}.fruitful_description.shadow-type-2 .top_line{position:absolute;width:100%;height:10px;overflow:hidden}.fruitful_description.shadow-type-2 .top_line:before{position:absolute;width:50%;height:45%;overflow:hidden;left:25%;border-radius:50%;z-index:1;top:-38%;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 0 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-2 .bottom_line{position:absolute;width:100%;height:10px;overflow:hidden;bottom:0}.fruitful_description.shadow-type-2 .bottom_line:before{position:absolute;width:50%;height:45%;overflow:hidden;left:25%;border-radius:50%;z-index:1;top:100%;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 0 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-3:before,.fruitful_description.shadow-type-3:after{display:none}.fruitful_description.shadow-type-3 .top_line:before,.fruitful_description.shadow-type-3 .top_line:after,.fruitful_description.shadow-type-5 .top_line:before,.fruitful_description.shadow-type-5 .top_line:after{z-index:-1;position:absolute;content:"";top:15px;left:10px;width:50%;bottom:80%;max-width:300px;min-height:4px;background:#777;-webkit-box-shadow:0 -13px 16px #777;box-shadow:0 -13px 16px #777;-webkit-transform:rotate(3deg);-moz-transform:rotate(3deg);-o-transform:rotate(3deg);-ms-transform:rotate(3deg);transform:rotate(3deg)}.fruitful_description.shadow-type-3 .top_line:after,.fruitful_description.shadow-type-5 .top_line:after{-webkit-transform:rotate(-3deg);-moz-transform:rotate(-3deg);-o-transform:rotate(-3deg);-ms-transform:rotate(-3deg);transform:rotate(-3deg);right:10px;left:auto}.fruitful_description.shadow-type-3 .bottom_line:before,.fruitful_description.shadow-type-3 .bottom_line:after,.fruitful_description.shadow-type-5 .bottom_line:before,.fruitful_description.shadow-type-5 .bottom_line:after{z-index:-1;position:absolute;content:"";bottom:15px;left:10px;width:50%;top:75%;max-width:300px;min-height:4px;background:#777;-webkit-box-shadow:0 13px 16px #777;-moz-box-shadow:0 13px 16px #777;box-shadow:0 13px 16px #777;-webkit-transform:rotate(-3deg);-moz-transform:rotate(-3deg);-o-transform:rotate(-3deg);-ms-transform:rotate(-3deg);transform:rotate(-3deg)}.fruitful_description.shadow-type-3 .bottom_line:after,.fruitful_description.shadow-type-5 .bottom_line:after{-webkit-transform:rotate(3deg);-moz-transform:rotate(3deg);-o-transform:rotate(3deg);-ms-transform:rotate(3deg);transform:rotate(3deg);right:10px;left:auto}.fruitful_description .text{margin:0 auto;width:90%;padding:10px 0}.ffs-sep{display:block;margin:0 0 30px}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0 !important;border:0;float:right}.ffs-bs .btn{-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;border:0 none}.resp-arrow{margin-top:8px}@media only screen and (max-width:480px){.fruitful_description .text{font-size:20px !important}}
1
+ .row,.clearfix{zoom:1}.clearfix:before,.clearfix:after,.row:before,.row:after{content:'';display:block;overflow:hidden;visibility:hidden;width:0;height:0}.ffs-two-one{width:48%}.ffs-three-one{width:30.66%}.ffs-three-two{width:65.33%}.ffs-four-one{width:22%}.ffs-four-two{width:48%}.ffs-four-three{width:74%}.ffs-five-one{width:16.8%}.ffs-five-two{width:37.6%}.ffs-five-three{width:58.4%}.ffs-five-four{width:67.2%}.ffs-six-one{width:13.33%}.ffs-six-two{width:30.66%}.ffs-six-three{width:47.99%}.ffs-six-four{width:65.33%}.ffs-six-five{width:82.67%}.ffs-two-one,.ffs-three-one,.ffs-three-two,.ffs-four-one,.ffs-four-two,.ffs-four-three,.ffs-five-one,.ffs-five-two,.ffs-five-three,.ffs-five-four,.ffs-six-one,.ffs-six-two,.ffs-six-three,.ffs-six-four,.ffs-six-five{float:left;margin-right:4%;margin-bottom:4%;position:relative}.last{clear:right;margin-right:0 !important}@media only screen and (max-width:768px){.ffs-two-one,.ffs-three-one,.ffs-three-two,.ffs-four-one,.ffs-four-two,.ffs-four-three,.ffs-five-one,.ffs-five-two,.ffs-five-three,.ffs-five-four,.ffs-six-one,.ffs-six-two,.ffs-six-three,.ffs-six-four,.ffs-six-five{margin-right:0;width:100% !important}}.info-box-row{display:block;float:left;margin:30px 0 25px;width:100%}.info-box-row .ffs-info-box .infobox-title{margin:0 0 5px;font-weight:300}.info-box-row .ffs-info-box .infobox-text{padding:0}.info-box-row .ffs-info-box img.icon{display:block;min-height:51px;margin:0 auto 15px;min-width:51px}.info-box-row .ffs-info-box .ffs-icon-container{text-align:center;margin:0 auto;display:block;width:auto}.info-box-row .ffs-info-box .ffs-icon-container i{text-align:center;font-size:26px;padding:10px;margin:5px 0}.ffs-info-box.center .ffs-icon-box,.ffs-info-box.center .ffs-content-box{width:100%}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-icon-box{width:20%;display:block}.ffs-info-box.left .ffs-content-box,.ffs-info-box.right .ffs-content-box{width:80%;display:block}.ffs-info-box.left .ffs-icon-box,.ffs-info-box.right .ffs-content-box{float:left}.ffs-info-box.right .ffs-icon-box,.ffs-info-box.left .ffs-content-box{float:right}.btn .ffs-icon-container{font-size:inherit}.btn .ffs-icon-container.left{padding:0 8px 0 0;text-align:left}.btn .ffs-icon-container.right{padding:0 0 0 8px;text-align:right}.fruitful_description_box{position:relative;z-index:0}.fruitful_description{float:left;width:100%;min-height:50px;margin:10px 0 20px 0;position:relative;display:block;background:#fff}.fruitful_description.shadow-type-4:before,.fruitful_description.shadow-type-5:before{position:absolute;width:80%;height:45%;left:10%;border-radius:50%;z-index:-1;top:0;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 -2px 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-4:after,.fruitful_description.shadow-type-5:after{position:absolute;width:80%;height:45%;left:10%;border-radius:50%;z-index:-1;bottom:0;content:"";-moz-box-shadow:0 2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 2px 16px rgba(0,0,0,0.4);box-shadow:0 2px 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-1:before,.fruitful_description.shadow-type-1:after{display:none}.fruitful_description.shadow-type-1 .top_line{z-index:2;display:block;width:100%;height:15px;overflow:hidden;position:absolute;top:0;left:0}.fruitful_description.shadow-type-1 .top_line:before,.fruitful_description.shadow-type-1 .top_line:after{z-index:1;position:absolute;content:"";top:-20px;left:10px;width:50%;bottom:31px;max-width:300px;background:#777;-webkit-box-shadow:0 13px 16px #777;-moz-box-shadow:0 13px 16px #777;box-shadow:0 13px 16px #777;-webkit-transform:rotate(-1.5deg);-moz-transform:rotate(-1.5deg);-o-transform:rotate(-1.5deg);-ms-transform:rotate(-1.5deg);transform:rotate(-1.5deg)}.fruitful_description.shadow-type-1 .top_line:after{-webkit-transform:rotate(1.5deg);-moz-transform:rotate(1.5deg);-o-transform:rotate(1.5deg);-ms-transform:rotate(1.5deg);transform:rotate(1.5deg);right:10px;left:auto}.fruitful_description.shadow-type-1 .bottom_line{z-index:2;display:block;width:100%;height:15px;overflow:hidden;position:absolute;bottom:0;left:0}.fruitful_description.shadow-type-1 .bottom_line:before,.fruitful_description.shadow-type-1 .bottom_line:after{z-index:1;position:absolute;content:"";top:31px;left:10px;width:50%;bottom:-20px;max-width:300px;background:#777;-webkit-box-shadow:0 -13px 16px #777;box-shadow:0 -13px 16px #777;-webkit-transform:rotate(1.5deg);-moz-transform:rotate(1.5deg);-o-transform:rotate(1.5deg);-ms-transform:rotate(1.5deg);transform:rotate(1.5deg)}.fruitful_description.shadow-type-1 .bottom_line:after{-webkit-transform:rotate(-1.5deg);-moz-transform:rotate(-1.5deg);-o-transform:rotate(-1.5deg);-ms-transform:rotate(-1.5deg);transform:rotate(-1.5deg);right:10px;left:auto}.fruitful_description.shadow-type-2:before,.fruitful_description.shadow-type-2:after{display:none}.fruitful_description.shadow-type-2 .top_line{position:absolute;width:100%;height:10px;overflow:hidden}.fruitful_description.shadow-type-2 .top_line:before{position:absolute;width:50%;height:45%;overflow:hidden;left:25%;border-radius:50%;z-index:1;top:-38%;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 0 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-2 .bottom_line{position:absolute;width:100%;height:10px;overflow:hidden;bottom:0}.fruitful_description.shadow-type-2 .bottom_line:before{position:absolute;width:50%;height:45%;overflow:hidden;left:25%;border-radius:50%;z-index:1;top:100%;content:"";-moz-box-shadow:0 -2px 16px rgba(0,0,0,0.4);-webkit-box-shadow:0 -2px 16px rgba(0,0,0,0.4);box-shadow:0 0 16px rgba(0,0,0,0.4)}.fruitful_description.shadow-type-3:before,.fruitful_description.shadow-type-3:after{display:none}.fruitful_description.shadow-type-3 .top_line:before,.fruitful_description.shadow-type-3 .top_line:after,.fruitful_description.shadow-type-5 .top_line:before,.fruitful_description.shadow-type-5 .top_line:after{z-index:-1;position:absolute;content:"";top:15px;left:10px;width:50%;bottom:80%;max-width:300px;min-height:4px;background:#777;-webkit-box-shadow:0 -13px 16px #777;box-shadow:0 -13px 16px #777;-webkit-transform:rotate(3deg);-moz-transform:rotate(3deg);-o-transform:rotate(3deg);-ms-transform:rotate(3deg);transform:rotate(3deg)}.fruitful_description.shadow-type-3 .top_line:after,.fruitful_description.shadow-type-5 .top_line:after{-webkit-transform:rotate(-3deg);-moz-transform:rotate(-3deg);-o-transform:rotate(-3deg);-ms-transform:rotate(-3deg);transform:rotate(-3deg);right:10px;left:auto}.fruitful_description.shadow-type-3 .bottom_line:before,.fruitful_description.shadow-type-3 .bottom_line:after,.fruitful_description.shadow-type-5 .bottom_line:before,.fruitful_description.shadow-type-5 .bottom_line:after{z-index:-1;position:absolute;content:"";bottom:15px;left:10px;width:50%;top:75%;max-width:300px;min-height:4px;background:#777;-webkit-box-shadow:0 13px 16px #777;-moz-box-shadow:0 13px 16px #777;box-shadow:0 13px 16px #777;-webkit-transform:rotate(-3deg);-moz-transform:rotate(-3deg);-o-transform:rotate(-3deg);-ms-transform:rotate(-3deg);transform:rotate(-3deg)}.fruitful_description.shadow-type-3 .bottom_line:after,.fruitful_description.shadow-type-5 .bottom_line:after{-webkit-transform:rotate(3deg);-moz-transform:rotate(3deg);-o-transform:rotate(3deg);-ms-transform:rotate(3deg);transform:rotate(3deg);right:10px;left:auto}.fruitful_description .text{margin:0 auto;width:90%;padding:10px 0}.ffs-sep{display:block;margin:0 0 30px}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0 !important;border:0;float:right}.ffs-bs .btn{-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;border:0 none}.resp-arrow{margin-top:8px}.fruitful_tab a{margin:auto;}@media only screen and (max-width:480px){.fruitful_description .text{font-size:20px !important}}
includes/shortcodes/js/fss_script.js CHANGED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ //function for fruitful_tab_link_shortcode onclick
2
+ var js_link_to_tab = function(element, item){
3
+ index = 0;
4
+ this_class = "";
5
+ while (this_class != "ffs-tabbed-nav" && index <= 250){
6
+ index++;
7
+ element = element.parentNode;
8
+ this_class = element.className.split(' ')[0];
9
+ }
10
+ element.childNodes[0].childNodes[item-1].click();
11
+ }
includes/shortcodes/less/original.less CHANGED
@@ -423,6 +423,11 @@ button.close {
423
  .resp-arrow {
424
  margin-top:8px;
425
  }
 
 
 
 
 
426
 
427
  @media only screen and (max-width: 480px) {
428
  .fruitful_description .text{font-size:20px !important;}
423
  .resp-arrow {
424
  margin-top:8px;
425
  }
426
+ .fruitful_tab{
427
+ a{
428
+ margin: auto;
429
+ }
430
+ }
431
 
432
  @media only screen and (max-width: 480px) {
433
  .fruitful_description .text{font-size:20px !important;}
includes/shortcodes/shortcodes.php CHANGED
@@ -6,8 +6,8 @@
6
  wp_enqueue_style( 'ffs-easyResponsiveTabs', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/js/tabs/easy-responsive-tabs.css');
7
  wp_enqueue_style( 'ffs-fontawesome', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/css/font-awesome.min.css');
8
  wp_enqueue_style( 'ffs-styles', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/css/ffs_styles.css');
9
- if ( !fruitful_is_bootstrap_css_loaded() )
10
- wp_enqueue_style( 'ffs-boostrap', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/bootstrap/css/bootstrap.min.css');
11
  }
12
 
13
  function fruitful_init_shortcodes_script() {
@@ -169,6 +169,8 @@ function fruitful_info_box ($atts, $content = null) {
169
  }
170
  add_shortcode ("fruitful_ibox", "fruitful_info_box");
171
 
 
 
172
  function fruitful_tabs_shortcode($atts, $content = null) {
173
  $output = '';
174
  $tab_titles = array();
@@ -182,8 +184,9 @@ function fruitful_tabs_shortcode($atts, $content = null) {
182
  'tabcolor' => '#71AFFF',
183
  'closed' => 'true'
184
  ), $atts, 'fruitful_tabs'));
185
-
186
- $id = 'ffs-tabbed-' . rand( 1, 100 );
 
187
  $type = 'default';
188
  $width = 'auto';
189
  $fit = 'false';
@@ -261,6 +264,14 @@ function fruitful_tab_shortcode ( $atts, $content = null ) {
261
  }
262
  add_shortcode( 'fruitful_tab', 'fruitful_tab_shortcode', 99 );
263
 
 
 
 
 
 
 
 
 
264
  function fruitful_sep ($atts, $content = null) {
265
  $out = $height = $style = '';
266
  extract(shortcode_atts(array(
@@ -489,95 +500,235 @@ function fruitful_sh_esc_link($link){
489
  return $link;
490
  }
491
 
492
- function fruitful_recent_posts(){
493
- $args = array(
494
- 'orderby' => 'modified',
495
- 'order' => 'DESC',
496
- 'post_type' => 'post',
497
- 'post_status' => 'publish',
498
- 'posts_per_page' => 4
499
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  $my_query = new WP_Query($args);
501
- if( $my_query->have_posts() ) {
502
- $out1 = "";
503
- while ($my_query->have_posts()) : $my_query->the_post();
504
- $day = get_the_date('d');
505
- $month_abr = get_the_date('M');
506
- $the_ID = get_the_ID();
507
- $post_class = get_post_class();
508
- $the_permalink = get_the_permalink();
509
- $title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
510
- $the_title = get_the_title();
511
- $the_post_thumbnail = get_the_post_thumbnail();
512
- $the_excerpt = get_the_excerpt();
513
- $the_category = get_the_category_list( ', ', 'fruitful' );
514
- $tags_list = get_the_tag_list( '', __( ', ', 'fruitful' ) );
 
 
 
 
515
 
516
- $out1 .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
517
 
518
- $out1 .= '<a href="'.$the_permalink.'" rel="bookmark">
519
- <div class="date_of_post updated">
520
- <span class="day_post">'.$day.'</span>
521
- <span class="month_post">'.$month_abr.'</span>
522
- </div>
523
- </a>';
524
 
525
- $out1 .= '<div class="post-content">
526
- <header class="post-header">
527
- <h2 class="post-title entry-title">
528
- <a href="'.$the_permalink.'" title="'.$title.'" rel="bookmark">'.$the_title.'</a>
529
- </h2>
530
- </header><!-- .entry-header -->';
531
 
532
- $out1 .= '<div class="entry-content">';
533
- if ( has_post_thumbnail() && ! post_password_required() ) :
534
- $out1 .='<div class="entry-thumbnail">'
535
- .$the_post_thumbnail.
536
- '</div>';
537
- endif;
538
- $out1 .= $the_excerpt.
539
- '</div><!-- .entry-content -->';
540
- $out1 .= '<footer class="entry-meta">
541
- <span class="author-link author"><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ))).'">'.get_the_author().'</a></span>
542
- <span class="cat-links">
543
- Posted in '.$the_category.'
544
- </span>
545
- <span class="tag-links">
546
- '.$tags_list.'
547
- </span> ';
548
- $out1 .= '</footer>
549
- </div>
550
- </article>';
551
- $out1 .= '<div class="clearfix"></div>';
552
- endwhile;
553
- }
554
- return $out1;
555
- wp_reset_query();
556
  }
557
 
558
  add_shortcode ("fruitful_recent_posts", "fruitful_recent_posts");
559
 
560
 
561
 
562
- function fruitful_recent_posts_slider(){
563
  //Add FlexSlider
564
  wp_enqueue_style( 'flex-slider', get_template_directory_uri() . '/js/flex_slider/slider.css');
565
  wp_enqueue_script('flex-fitvid-j', get_template_directory_uri() . '/js/flex_slider/jquery.flexslider-min.js', array( 'jquery' ), '20130930', false );
566
  wp_enqueue_script('flex-slider', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/js/slider_init.js', array( 'jquery' ));
567
 
568
-
569
- $args=array(
570
- 'orderby' => 'modified',
571
- 'order' => 'DESC',
572
- 'post_type' => 'post',
573
- 'post_status' => 'publish',
574
- 'posts_per_page'=> 4,
575
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
  $my_query = new WP_Query($args);
577
  if( $my_query->have_posts() ) {
578
  $out1 = "";
579
- $out1 .= '<h1>Chosen posts</h1>
580
- <div class="flexslider">
581
  <ul class="slides">';
582
  while ($my_query->have_posts()) : $my_query->the_post();
583
  $day = get_the_date('d');
@@ -588,9 +739,13 @@ function fruitful_recent_posts_slider(){
588
  $title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
589
  $the_title = get_the_title();
590
  $the_post_thumbnail = get_the_post_thumbnail();
 
 
 
591
  $the_excerpt = get_the_excerpt();
 
592
  $the_category = get_the_category_list( ', ', 'fruitful' );
593
- $tags_list = get_the_tag_list( '', __( ', ', 'fruitful' ) );
594
 
595
  $out1 .= '<li>';
596
  $out1 .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
@@ -622,8 +777,8 @@ function fruitful_recent_posts_slider(){
622
  <span class="cat-links">
623
  Posted in '.$the_category.'
624
  </span>
625
- <span class="tag-links">
626
- '.$tags_list.'
627
  </span> ';
628
  $out1 .= '</footer>
629
  </div>
6
  wp_enqueue_style( 'ffs-easyResponsiveTabs', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/js/tabs/easy-responsive-tabs.css');
7
  wp_enqueue_style( 'ffs-fontawesome', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/css/font-awesome.min.css');
8
  wp_enqueue_style( 'ffs-styles', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/css/ffs_styles.css');
9
+ //if ( !fruitful_is_bootstrap_css_loaded() )
10
+ //wp_enqueue_style( 'ffs-boostrap', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/bootstrap/css/bootstrap.min.css');
11
  }
12
 
13
  function fruitful_init_shortcodes_script() {
169
  }
170
  add_shortcode ("fruitful_ibox", "fruitful_info_box");
171
 
172
+
173
+
174
  function fruitful_tabs_shortcode($atts, $content = null) {
175
  $output = '';
176
  $tab_titles = array();
184
  'tabcolor' => '#71AFFF',
185
  'closed' => 'true'
186
  ), $atts, 'fruitful_tabs'));
187
+ static $tab_id = 0;
188
+ ++$tab_id;
189
+ $id = 'ffs-tabbed-' . $tab_id;
190
  $type = 'default';
191
  $width = 'auto';
192
  $fit = 'false';
264
  }
265
  add_shortcode( 'fruitful_tab', 'fruitful_tab_shortcode', 99 );
266
 
267
+ function fruitful_tab_link_shortcode ( $atts, $content = null ) {
268
+ extract(shortcode_atts( array(
269
+ 'item' => '1'
270
+ ), $atts));
271
+ return '<a href="#" onclick = "js_link_to_tab(this, ' . $item . ')">' . do_shortcode( $content ) . '</a>';
272
+ }
273
+ add_shortcode( 'fruitful_tab_link', 'fruitful_tab_link_shortcode', 100 );
274
+
275
  function fruitful_sep ($atts, $content = null) {
276
  $out = $height = $style = '';
277
  extract(shortcode_atts(array(
500
  return $link;
501
  }
502
 
503
+ function get_comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
504
+ global $wpcommentspopupfile, $wpcommentsjavascript;
505
+
506
+ $id = get_the_ID();
507
+ $title = get_the_title();
508
+ $number = get_comments_number( $id );
509
+
510
+ if ( false === $zero ) {
511
+ /* translators: %s: post title */
512
+ $zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
513
+ }
514
+
515
+ if ( false === $one ) {
516
+ /* translators: %s: post title */
517
+ $one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
518
+ }
519
+
520
+ if ( false === $more ) {
521
+ /* translators: 1: Number of comments 2: post title */
522
+ $more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
523
+ $more = sprintf( $more, number_format_i18n( $number ), $title );
524
+ }
525
+
526
+ if ( false === $none ) {
527
+ /* translators: %s: post title */
528
+ $none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
529
+ }
530
+
531
+ $out = '';
532
+
533
+ if ( 0 == $number && !comments_open() && !pings_open() ) {
534
+ $out .= '<span' . ((!empty($css_class)) ? ' class="' . esc_attr( $css_class ) . '"' : '') . '>' . $none . '</span>';
535
+ return;
536
+ }
537
+
538
+ if ( post_password_required() ) {
539
+ _e( 'Enter your password to view comments.' );
540
+ return;
541
+ }
542
+
543
+ $out .= '<a href="';
544
+ if ( $wpcommentsjavascript ) {
545
+ if ( empty( $wpcommentspopupfile ) )
546
+ $home = home_url();
547
+ else
548
+ $home = get_option('siteurl');
549
+ $out .= $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;
550
+ $out .= '" onclick="wpopen(this.href); return false"';
551
+ } else {
552
+ // if comments_popup_script() is not in the template, display simple comment link
553
+ if ( 0 == $number ) {
554
+ $respond_link = get_permalink() . '#respond';
555
+ /**
556
+ * Filter the respond link when a post has no comments.
557
+ *
558
+ * @since 4.4.0
559
+ *
560
+ * @param string $respond_link The default response link.
561
+ * @param integer $id The post ID.
562
+ */
563
+ $out .= apply_filters( 'respond_link', $respond_link, $id );
564
+ } else {
565
+ $out .= get_comments_link();
566
+ }
567
+ $out .= '"';
568
+ }
569
+
570
+ if ( !empty( $css_class ) ) {
571
+ $out .= ' class="'.$css_class.'" ';
572
+ }
573
+
574
+ $attributes = '';
575
+ /**
576
+ * Filter the comments popup link attributes for display.
577
+ *
578
+ * @since 2.5.0
579
+ *
580
+ * @param string $attributes The comments popup link attributes. Default empty.
581
+ */
582
+ echo apply_filters( 'comments_popup_link_attributes', $attributes );
583
+
584
+ $out .= '>';
585
+ $out .= get_comments_number_text( $zero, $one, $more );
586
+ $out .= '</a>';
587
+ return $out;
588
+ }
589
+
590
+ function fruitful_recent_posts($atts){
591
+
592
+ extract(shortcode_atts(array(
593
+ 'posts' => 4,
594
+ 'cat' => '',
595
+ 'excerpt' => ''
596
+ ), $atts));
597
+ if(!empty($cat)) {
598
+ $cats = explode(", ", $cat);
599
+ $args = array(
600
+ 'orderby' => 'modified',
601
+ 'order' => 'DESC',
602
+ 'post_type' => 'post',
603
+ 'post_status' => 'publish',
604
+ 'ignore_sticky_posts' => true,
605
+ 'posts_per_page'=> $posts,
606
+ 'tax_query' => array(
607
+ array(
608
+ 'taxonomy' => 'category',
609
+ 'field' => 'slug',
610
+ 'terms' => $cats
611
+ )
612
+ )
613
+ );
614
+ } else {
615
+ $args = array(
616
+ 'orderby' => 'modified',
617
+ 'order' => 'DESC',
618
+ 'post_type' => 'post',
619
+ 'post_status' => 'publish',
620
+ 'ignore_sticky_posts' => true,
621
+ 'posts_per_page'=> $posts
622
+ );
623
+ }
624
  $my_query = new WP_Query($args);
625
+ if( $my_query->have_posts() ) {
626
+ $out1 = "";
627
+ while ($my_query->have_posts()) : $my_query->the_post();
628
+ $day = get_the_date('d');
629
+ $month_abr = get_the_date('M');
630
+ $the_ID = get_the_ID();
631
+ $post_class = get_post_class();
632
+ $the_permalink = get_the_permalink();
633
+ $title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
634
+ $the_title = get_the_title();
635
+ $the_post_thumbnail = get_the_post_thumbnail();
636
+ if($excerpt == 0){
637
+ $the_excerpt = get_the_content();
638
+ } else {
639
+ $the_excerpt = get_the_excerpt();
640
+ }
641
+ $the_category = get_the_category_list( ', ', 'fruitful' );
642
+ $comments = get_comments_popup_link( __( 'Leave a comment', 'fruitful' ), __( '1 Comment', 'fruitful' ), __( '% Comments', 'fruitful' ) );
643
 
644
+ $out1 .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
645
 
646
+ $out1 .= '<a href="'.$the_permalink.'" rel="bookmark">
647
+ <div class="date_of_post updated">
648
+ <span class="day_post">'.$day.'</span>
649
+ <span class="month_post">'.$month_abr.'</span>
650
+ </div>
651
+ </a>';
652
 
653
+ $out1 .= '<div class="post-content">
654
+ <header class="post-header">
655
+ <h2 class="post-title entry-title">
656
+ <a href="'.$the_permalink.'" title="'.$title.'" rel="bookmark">'.$the_title.'</a>
657
+ </h2>
658
+ </header><!-- .entry-header -->';
659
 
660
+ $out1 .= '<div class="entry-content">';
661
+ if ( has_post_thumbnail() && ! post_password_required() ) :
662
+ $out1 .='<div class="entry-thumbnail">'
663
+ .$the_post_thumbnail.
664
+ '</div>';
665
+ endif;
666
+ $out1 .= $the_excerpt.
667
+ '</div><!-- .entry-content -->';
668
+ $out1 .= '<footer class="entry-meta">
669
+ <span class="author-link author"><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ))).'">'.get_the_author().'</a></span>
670
+ <span class="cat-links">
671
+ Posted in '.$the_category.'
672
+ </span>
673
+ <span class="comments-link">
674
+ '.$comments.'
675
+ </span> ';
676
+ $out1 .= '</footer>
677
+ </div>
678
+ </article>';
679
+ $out1 .= '<div class="clearfix"></div>';
680
+ endwhile;
681
+ }
682
+ if(isset($out1)) return $out1;
683
+ wp_reset_query();
684
  }
685
 
686
  add_shortcode ("fruitful_recent_posts", "fruitful_recent_posts");
687
 
688
 
689
 
690
+ function fruitful_recent_posts_slider($atts){
691
  //Add FlexSlider
692
  wp_enqueue_style( 'flex-slider', get_template_directory_uri() . '/js/flex_slider/slider.css');
693
  wp_enqueue_script('flex-fitvid-j', get_template_directory_uri() . '/js/flex_slider/jquery.flexslider-min.js', array( 'jquery' ), '20130930', false );
694
  wp_enqueue_script('flex-slider', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/js/slider_init.js', array( 'jquery' ));
695
 
696
+ extract(shortcode_atts(array(
697
+ 'posts' => 4,
698
+ 'cat' => '',
699
+ 'excerpt' => ''
700
+ ), $atts));
701
+ if(!empty($cat)) {
702
+ $cats = explode(", ", $cat);
703
+ $args = array(
704
+ 'orderby' => 'modified',
705
+ 'order' => 'DESC',
706
+ 'post_type' => 'post',
707
+ 'post_status' => 'publish',
708
+ 'ignore_sticky_posts' => true,
709
+ 'posts_per_page'=> $posts,
710
+ 'tax_query' => array(
711
+ array(
712
+ 'taxonomy' => 'category',
713
+ 'field' => 'slug',
714
+ 'terms' => $cats
715
+ )
716
+ )
717
+ );
718
+ } else {
719
+ $args = array(
720
+ 'orderby' => 'modified',
721
+ 'order' => 'DESC',
722
+ 'post_type' => 'post',
723
+ 'post_status' => 'publish',
724
+ 'ignore_sticky_posts' => true,
725
+ 'posts_per_page'=> $posts
726
+ );
727
+ }
728
  $my_query = new WP_Query($args);
729
  if( $my_query->have_posts() ) {
730
  $out1 = "";
731
+ $out1 .= '<div class="flexslider">
 
732
  <ul class="slides">';
733
  while ($my_query->have_posts()) : $my_query->the_post();
734
  $day = get_the_date('d');
739
  $title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
740
  $the_title = get_the_title();
741
  $the_post_thumbnail = get_the_post_thumbnail();
742
+ if($excerpt == 0){
743
+ $the_excerpt = get_the_content();
744
+ } else {
745
  $the_excerpt = get_the_excerpt();
746
+ }
747
  $the_category = get_the_category_list( ', ', 'fruitful' );
748
+ $comments = get_comments_popup_link( __( 'Leave a comment', 'fruitful' ), __( '1 Comment', 'fruitful' ), __( '% Comments', 'fruitful' ) );
749
 
750
  $out1 .= '<li>';
751
  $out1 .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
777
  <span class="cat-links">
778
  Posted in '.$the_category.'
779
  </span>
780
+ <span class="comments-link">
781
+ '.$comments.'
782
  </span> ';
783
  $out1 .= '</footer>
784
  </div>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://fruitfulcode.com
4
  Tags: admin, fruitful, shortcode, shortcodes, short code, editor, content, bootstrap, post, page, tab, tabs, horizontal tabs, vertical tabs, accordion, promo text, columns, infobox, separator, alert, progress bar, button, recent post, recent news
5
  Requires at least: 3.4.1
6
  Tested up to: 4.4
7
- Stable tag: 1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,7 +29,8 @@ http://plugins.fruitfulcode.com/shortcodes/
29
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/progress-bar/">Progress bar</a></li>
30
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/button/">Button</a></li>
31
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/alert/">Alert</a></li>
32
- <li><a href="http://plugins.fruitfulcode.com/shortcodes/recent-posts/">Recent posts</a></li>
 
33
  </ol>
34
 
35
  <h3>Technical support</h3>
@@ -79,6 +80,17 @@ You can check <a href="http://support.fruitfulcode.com/hc/en-us/sections/2004063
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
 
 
 
 
 
 
82
  = 1.4 =
83
  Release Date: 21.12.2015
84
 
4
  Tags: admin, fruitful, shortcode, shortcodes, short code, editor, content, bootstrap, post, page, tab, tabs, horizontal tabs, vertical tabs, accordion, promo text, columns, infobox, separator, alert, progress bar, button, recent post, recent news
5
  Requires at least: 3.4.1
6
  Tested up to: 4.4
7
+ Stable tag: 1.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/progress-bar/">Progress bar</a></li>
30
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/button/">Button</a></li>
31
  <li><a href="http://plugins.fruitfulcode.com/shortcodes/alert/">Alert</a></li>
32
+ <li><a href="http://plugins.fruitfulcode.com/shortcodes/recent-posts/">Recent posts</a></li>
33
+ <li><a href="http://plugins.fruitfulcode.com/shortcodes/recent-posts-slider/">Recent posts slider</a></li>
34
  </ol>
35
 
36
  <h3>Technical support</h3>
80
 
81
  == Changelog ==
82
 
83
+ = 1.4.1 =
84
+ Release Date 22.12.2015
85
+
86
+ * New features
87
+ * Attributes for recent posts shortcodes
88
+
89
+ * Bugfixes
90
+ * Change random id value to static
91
+ * CSS fix
92
+
93
+
94
  = 1.4 =
95
  Release Date: 21.12.2015
96