Version Description
Release Date 11.07.2017
Added * Shortcodes support for recent posts content
Tested * To WordPress 4.8
Fixed * Width tabs on tablets * Slider height * Recent posts and posts slider - fixed resetting post data issue * Recent posts - added fallback for fruitful_load_template_part
Download this release
Release Info
Developer | fruitfulcode |
Plugin | Fruitful Shortcodes |
Version | 1.6 |
Comparing to | |
See all releases |
Code changes from version 1.5 to 1.6
- ff-shortcodes.php +2 -2
- includes/admin/admin-mce.php +0 -0
- includes/admin/admin-options.php +0 -0
- includes/admin/tinymce/accordion.png +0 -0
- includes/admin/tinymce/banner.png +0 -0
- includes/admin/tinymce/blockquote.png +0 -0
- includes/admin/tinymce/blog.png +0 -0
- includes/admin/tinymce/bloglist.png +0 -0
- includes/admin/tinymce/callout.png +0 -0
- includes/admin/tinymce/clear.png +0 -0
- includes/admin/tinymce/comment.png +0 -0
- includes/admin/tinymce/description.png +0 -0
- includes/admin/tinymce/divider.png +0 -0
- includes/admin/tinymce/dropcap.png +0 -0
- includes/admin/tinymce/fblogin.png +0 -0
- includes/admin/tinymce/ffs.tinymce.js +0 -0
- includes/admin/tinymce/gallery.png +0 -0
- includes/admin/tinymce/gap.png +0 -0
- includes/admin/tinymce/googlefont.png +0 -0
- includes/admin/tinymce/highlight.png +0 -0
- includes/admin/tinymce/icon.png +0 -0
- includes/admin/tinymce/iconbox.png +0 -0
- includes/admin/tinymce/list.png +0 -0
- includes/admin/tinymce/maps.png +0 -0
- includes/admin/tinymce/member.png +0 -0
- includes/admin/tinymce/miniicon.png +0 -0
- includes/admin/tinymce/pricing.png +0 -0
- includes/admin/tinymce/projects.png +0 -0
- includes/admin/tinymce/recent_news.png +0 -0
- includes/admin/tinymce/recent_news_slider.png +0 -0
- includes/admin/tinymce/retinaicon.png +0 -0
- includes/admin/tinymce/retinaiconbox.png +0 -0
- includes/admin/tinymce/separatorheadline.png +0 -0
- includes/admin/tinymce/skill.png +0 -0
- includes/admin/tinymce/socialmedia.png +0 -0
- includes/admin/tinymce/table.png +0 -0
- includes/admin/tinymce/teaser.png +0 -0
- includes/admin/tinymce/teaserbox.png +0 -0
- includes/admin/tinymce/testimonial.png +0 -0
- includes/admin/tinymce/thelook.png +0 -0
- includes/admin/tinymce/toggle.png +0 -0
- includes/admin/tinymce/tooltip.png +0 -0
- includes/admin/tinymce/trtd.png +0 -0
- includes/admin/tinymce/video.png +0 -0
- includes/admin/tinymce/visibility.png +0 -0
- includes/shortcodes/bootstrap/css/bootstrap-theme.css +0 -0
- includes/shortcodes/bootstrap/css/bootstrap-theme.min.css +0 -0
- includes/shortcodes/bootstrap/css/bootstrap.css +0 -0
- includes/shortcodes/bootstrap/css/bootstrap.min.css +0 -0
- includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.svg +0 -0
- includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- includes/shortcodes/bootstrap/js/bootstrap.js +0 -0
- includes/shortcodes/bootstrap/js/bootstrap.min.js +0 -0
- includes/shortcodes/css/ffs_styles.css +0 -0
- includes/shortcodes/css/font-awesome.min.css +0 -0
- includes/shortcodes/css/original.css +0 -0
- includes/shortcodes/css/original.css.map +0 -0
- includes/shortcodes/flex_slider/froogaloop.js +0 -0
- includes/shortcodes/flex_slider/images/bg_direction_nav.png +0 -0
- includes/shortcodes/flex_slider/images/paging.png +0 -0
- includes/shortcodes/flex_slider/jquery.easing.js +0 -0
- includes/shortcodes/flex_slider/jquery.fitvid.js +0 -0
- includes/shortcodes/flex_slider/jquery.flexslider-min.js +0 -0
- includes/shortcodes/flex_slider/jquery.mousewheel.js +0 -0
- includes/shortcodes/flex_slider/modernizr.js +0 -0
- includes/shortcodes/flex_slider/shBrushCss.js +0 -0
- includes/shortcodes/flex_slider/shBrushJScript.js +0 -0
- includes/shortcodes/flex_slider/shBrushXml.js +0 -0
- includes/shortcodes/flex_slider/shCore.js +0 -0
- includes/shortcodes/flex_slider/slider.css +0 -0
- includes/shortcodes/fonts/FontAwesome.otf +0 -0
- includes/shortcodes/js/fss_script.js +0 -0
- includes/shortcodes/js/slider_init.js +2 -1
- includes/shortcodes/js/tabs/easy-responsive-tabs.css +4 -4
- includes/shortcodes/js/tabs/easyResponsiveTabs.js +0 -0
- includes/shortcodes/less/ffs_styles.less +0 -0
- includes/shortcodes/less/koala-config.json +0 -0
- includes/shortcodes/less/original.less +0 -0
- includes/shortcodes/shortcodes.php +181 -70
- readme.txt +17 -5
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.
|
7 |
Author: fruitfulcode
|
8 |
Author URI: http://fruitfulcode.com
|
9 |
License: GPL2
|
@@ -77,4 +77,4 @@ class ffs {
|
|
77 |
|
78 |
}
|
79 |
|
80 |
-
$ffs = new ffs();
|
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.6
|
7 |
Author: fruitfulcode
|
8 |
Author URI: http://fruitfulcode.com
|
9 |
License: GPL2
|
77 |
|
78 |
}
|
79 |
|
80 |
+
$ffs = new ffs();
|
includes/admin/admin-mce.php
CHANGED
File without changes
|
includes/admin/admin-options.php
CHANGED
File without changes
|
includes/admin/tinymce/accordion.png
CHANGED
File without changes
|
includes/admin/tinymce/banner.png
CHANGED
File without changes
|
includes/admin/tinymce/blockquote.png
CHANGED
File without changes
|
includes/admin/tinymce/blog.png
CHANGED
File without changes
|
includes/admin/tinymce/bloglist.png
CHANGED
File without changes
|
includes/admin/tinymce/callout.png
CHANGED
File without changes
|
includes/admin/tinymce/clear.png
CHANGED
File without changes
|
includes/admin/tinymce/comment.png
CHANGED
File without changes
|
includes/admin/tinymce/description.png
CHANGED
File without changes
|
includes/admin/tinymce/divider.png
CHANGED
File without changes
|
includes/admin/tinymce/dropcap.png
CHANGED
File without changes
|
includes/admin/tinymce/fblogin.png
CHANGED
File without changes
|
includes/admin/tinymce/ffs.tinymce.js
CHANGED
File without changes
|
includes/admin/tinymce/gallery.png
CHANGED
File without changes
|
includes/admin/tinymce/gap.png
CHANGED
File without changes
|
includes/admin/tinymce/googlefont.png
CHANGED
File without changes
|
includes/admin/tinymce/highlight.png
CHANGED
File without changes
|
includes/admin/tinymce/icon.png
CHANGED
File without changes
|
includes/admin/tinymce/iconbox.png
CHANGED
File without changes
|
includes/admin/tinymce/list.png
CHANGED
File without changes
|
includes/admin/tinymce/maps.png
CHANGED
File without changes
|
includes/admin/tinymce/member.png
CHANGED
File without changes
|
includes/admin/tinymce/miniicon.png
CHANGED
File without changes
|
includes/admin/tinymce/pricing.png
CHANGED
File without changes
|
includes/admin/tinymce/projects.png
CHANGED
File without changes
|
includes/admin/tinymce/recent_news.png
CHANGED
File without changes
|
includes/admin/tinymce/recent_news_slider.png
CHANGED
File without changes
|
includes/admin/tinymce/retinaicon.png
CHANGED
File without changes
|
includes/admin/tinymce/retinaiconbox.png
CHANGED
File without changes
|
includes/admin/tinymce/separatorheadline.png
CHANGED
File without changes
|
includes/admin/tinymce/skill.png
CHANGED
File without changes
|
includes/admin/tinymce/socialmedia.png
CHANGED
File without changes
|
includes/admin/tinymce/table.png
CHANGED
File without changes
|
includes/admin/tinymce/teaser.png
CHANGED
File without changes
|
includes/admin/tinymce/teaserbox.png
CHANGED
File without changes
|
includes/admin/tinymce/testimonial.png
CHANGED
File without changes
|
includes/admin/tinymce/thelook.png
CHANGED
File without changes
|
includes/admin/tinymce/toggle.png
CHANGED
File without changes
|
includes/admin/tinymce/tooltip.png
CHANGED
File without changes
|
includes/admin/tinymce/trtd.png
CHANGED
File without changes
|
includes/admin/tinymce/video.png
CHANGED
File without changes
|
includes/admin/tinymce/visibility.png
CHANGED
File without changes
|
includes/shortcodes/bootstrap/css/bootstrap-theme.css
CHANGED
File without changes
|
includes/shortcodes/bootstrap/css/bootstrap-theme.min.css
CHANGED
File without changes
|
includes/shortcodes/bootstrap/css/bootstrap.css
CHANGED
File without changes
|
includes/shortcodes/bootstrap/css/bootstrap.min.css
CHANGED
File without changes
|
includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.eot
CHANGED
File without changes
|
includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.svg
CHANGED
File without changes
|
includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.ttf
CHANGED
File without changes
|
includes/shortcodes/bootstrap/fonts/glyphicons-halflings-regular.woff
CHANGED
File without changes
|
includes/shortcodes/bootstrap/js/bootstrap.js
CHANGED
File without changes
|
includes/shortcodes/bootstrap/js/bootstrap.min.js
CHANGED
File without changes
|
includes/shortcodes/css/ffs_styles.css
CHANGED
File without changes
|
includes/shortcodes/css/font-awesome.min.css
CHANGED
File without changes
|
includes/shortcodes/css/original.css
CHANGED
File without changes
|
includes/shortcodes/css/original.css.map
CHANGED
File without changes
|
includes/shortcodes/flex_slider/froogaloop.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/images/bg_direction_nav.png
CHANGED
File without changes
|
includes/shortcodes/flex_slider/images/paging.png
CHANGED
File without changes
|
includes/shortcodes/flex_slider/jquery.easing.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/jquery.fitvid.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/jquery.flexslider-min.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/jquery.mousewheel.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/modernizr.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/shBrushCss.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/shBrushJScript.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/shBrushXml.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/shCore.js
CHANGED
File without changes
|
includes/shortcodes/flex_slider/slider.css
CHANGED
File without changes
|
includes/shortcodes/fonts/FontAwesome.otf
CHANGED
File without changes
|
includes/shortcodes/js/fss_script.js
CHANGED
File without changes
|
includes/shortcodes/js/slider_init.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
/*starts flexslider */
|
2 |
jQuery(window).load(function() {
|
3 |
jQuery('.flexslider').flexslider({
|
4 |
-
animation: "slide"
|
|
|
5 |
});
|
6 |
});
|
1 |
/*starts flexslider */
|
2 |
jQuery(window).load(function() {
|
3 |
jQuery('.flexslider').flexslider({
|
4 |
+
animation: "slide",
|
5 |
+
smoothHeight: true,
|
6 |
});
|
7 |
});
|
includes/shortcodes/js/tabs/easy-responsive-tabs.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
margin:10px 0 20px 0;
|
3 |
}
|
4 |
|
@@ -78,7 +78,7 @@ h2.resp-tab-title:last-child {
|
|
78 |
/*-----------Vertical tabs-----------*/
|
79 |
.resp-vtabs ul.resp-tabs-list {
|
80 |
float: left;
|
81 |
-
width: 30
|
82 |
}
|
83 |
|
84 |
.resp-vtabs .resp-tabs-list li {
|
@@ -94,7 +94,7 @@ h2.resp-tab-title:last-child {
|
|
94 |
background-color: #fff;
|
95 |
border: 1px solid #c1c1c1;
|
96 |
float: left;
|
97 |
-
width: 69.5
|
98 |
min-height: 250px;
|
99 |
clear: none;
|
100 |
}
|
@@ -180,7 +180,7 @@ h2.resp-accordion:first-child {
|
|
180 |
.resp-vtabs .resp-tabs-container {
|
181 |
border: none;
|
182 |
float: none;
|
183 |
-
width: 100
|
184 |
min-height: initial;
|
185 |
clear: none;
|
186 |
}
|
1 |
+
.ffs-tabbed-nav {
|
2 |
margin:10px 0 20px 0;
|
3 |
}
|
4 |
|
78 |
/*-----------Vertical tabs-----------*/
|
79 |
.resp-vtabs ul.resp-tabs-list {
|
80 |
float: left;
|
81 |
+
width: 30%!important;
|
82 |
}
|
83 |
|
84 |
.resp-vtabs .resp-tabs-list li {
|
94 |
background-color: #fff;
|
95 |
border: 1px solid #c1c1c1;
|
96 |
float: left;
|
97 |
+
width: 69.5%!important;
|
98 |
min-height: 250px;
|
99 |
clear: none;
|
100 |
}
|
180 |
.resp-vtabs .resp-tabs-container {
|
181 |
border: none;
|
182 |
float: none;
|
183 |
+
width: 100%!important;
|
184 |
min-height: initial;
|
185 |
clear: none;
|
186 |
}
|
includes/shortcodes/js/tabs/easyResponsiveTabs.js
CHANGED
File without changes
|
includes/shortcodes/less/ffs_styles.less
CHANGED
File without changes
|
includes/shortcodes/less/koala-config.json
CHANGED
File without changes
|
includes/shortcodes/less/original.less
CHANGED
File without changes
|
includes/shortcodes/shortcodes.php
CHANGED
@@ -592,12 +592,12 @@ function fruitful_load_template_part() {
|
|
592 |
}
|
593 |
|
594 |
function fruitful_recent_posts($atts){
|
595 |
-
|
596 |
-
$posts = $cat = '';
|
597 |
$this_id = get_the_ID();
|
598 |
extract(shortcode_atts(array(
|
599 |
-
|
600 |
-
|
601 |
), $atts));
|
602 |
|
603 |
if(!empty($cat)) {
|
@@ -629,18 +629,73 @@ function fruitful_recent_posts($atts){
|
|
629 |
'posts_per_page'=> $posts
|
630 |
);
|
631 |
}
|
632 |
-
|
633 |
$out .= '<div class="recent-posts blog-grid blog">';
|
634 |
$my_query = new WP_Query($args);
|
635 |
-
|
636 |
-
|
637 |
-
|
|
|
638 |
$out .= $content;
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
}
|
645 |
|
646 |
add_shortcode ("fruitful_recent_posts", "fruitful_recent_posts");
|
@@ -648,66 +703,122 @@ add_shortcode ("fruitful_recent_posts", "fruitful_recent_posts");
|
|
648 |
|
649 |
|
650 |
function fruitful_recent_posts_slider($atts){
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
)
|
680 |
-
)
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
701 |
$out .= $content;
|
702 |
-
|
703 |
-
endwhile;
|
704 |
-
$out .= '</ul>';
|
705 |
-
$out .= '</div>';
|
706 |
-
$out .= '<div class="clearfix"></div>';
|
707 |
-
}
|
708 |
|
709 |
-
|
710 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
}
|
712 |
|
713 |
add_shortcode ("fruitful_recent_posts_slider", "fruitful_recent_posts_slider");
|
592 |
}
|
593 |
|
594 |
function fruitful_recent_posts($atts){
|
595 |
+
|
596 |
+
$posts = $cat = $out = '';
|
597 |
$this_id = get_the_ID();
|
598 |
extract(shortcode_atts(array(
|
599 |
+
'posts' => 4,
|
600 |
+
'cat' => ''
|
601 |
), $atts));
|
602 |
|
603 |
if(!empty($cat)) {
|
629 |
'posts_per_page'=> $posts
|
630 |
);
|
631 |
}
|
632 |
+
|
633 |
$out .= '<div class="recent-posts blog-grid blog">';
|
634 |
$my_query = new WP_Query($args);
|
635 |
+
if( $my_query->have_posts() ) {
|
636 |
+
while ($my_query->have_posts()) : $my_query->the_post();
|
637 |
+
$content = fruitful_load_template_part();
|
638 |
+
if ( !empty( $content ) ) {
|
639 |
$out .= $content;
|
640 |
+
} else {
|
641 |
+
$day = get_the_date('d');
|
642 |
+
$month_abr = get_the_date('M');
|
643 |
+
$the_ID = get_the_ID();
|
644 |
+
$post_class = get_post_class();
|
645 |
+
$the_permalink = get_the_permalink();
|
646 |
+
$title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
|
647 |
+
$the_title = get_the_title();
|
648 |
+
$the_post_thumbnail = get_the_post_thumbnail();
|
649 |
+
if( empty(get_the_excerpt()) ) {
|
650 |
+
$the_excerpt = get_the_content();
|
651 |
+
} else {
|
652 |
+
$the_excerpt = get_the_excerpt();
|
653 |
+
}
|
654 |
+
$the_category = get_the_category_list( ', ', 'fruitful' );
|
655 |
+
$comments = get_comments_popup_link( __( 'Leave a comment', 'fruitful' ), __( '1 Comment', 'fruitful' ), __( '% Comments', 'fruitful' ) );
|
656 |
+
|
657 |
+
$out .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
|
658 |
+
|
659 |
+
$out .= '<a href="'.$the_permalink.'" rel="bookmark">
|
660 |
+
<div class="date_of_post updated">
|
661 |
+
<span class="day_post">'.$day.'</span>
|
662 |
+
<span class="month_post">'.$month_abr.'</span>
|
663 |
+
</div>
|
664 |
+
</a>';
|
665 |
+
|
666 |
+
$out .= '<div class="post-content">
|
667 |
+
<header class="post-header">
|
668 |
+
<h2 class="post-title entry-title">
|
669 |
+
<a href="'.$the_permalink.'" title="'.$title.'" rel="bookmark">'.$the_title.'</a>
|
670 |
+
</h2>
|
671 |
+
</header><!-- .entry-header -->';
|
672 |
+
$out .= '<div class="entry-content">';
|
673 |
+
if ( has_post_thumbnail() && ! post_password_required() ) :
|
674 |
+
$out .='<div class="entry-thumbnail">'
|
675 |
+
.$the_post_thumbnail.
|
676 |
+
'</div>';
|
677 |
+
endif;
|
678 |
+
$out .= do_shortcode($the_excerpt).
|
679 |
+
'</div><!-- .entry-content -->';
|
680 |
+
$out .= '<footer class="entry-meta">
|
681 |
+
<span class="author-link author"><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ))).'">'.get_the_author().'</a></span>
|
682 |
+
<span class="cat-links">
|
683 |
+
Posted in '.$the_category.'
|
684 |
+
</span>
|
685 |
+
<span class="comments-link">
|
686 |
+
'.$comments.'
|
687 |
+
</span> ';
|
688 |
+
$out .= '</footer>
|
689 |
+
</div>
|
690 |
+
</article>';
|
691 |
+
$out .= '<div class="clearfix"></div>';
|
692 |
+
}
|
693 |
+
endwhile;
|
694 |
+
}
|
695 |
+
$out .= '</div>';
|
696 |
+
|
697 |
+
wp_reset_postdata();
|
698 |
+
if(isset($out)) return $out;
|
699 |
}
|
700 |
|
701 |
add_shortcode ("fruitful_recent_posts", "fruitful_recent_posts");
|
703 |
|
704 |
|
705 |
function fruitful_recent_posts_slider($atts){
|
706 |
+
//Add FlexSlider
|
707 |
+
wp_enqueue_style( 'flex-slider', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/flex_slider/slider.css');
|
708 |
+
wp_enqueue_script('flex-fitvid-j', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/flex_slider/jquery.flexslider-min.js', array( 'jquery' ), '20130930', false );
|
709 |
+
wp_enqueue_script('flex-slider', FRUITFUL_SHORTCODE_URI . 'includes/shortcodes/js/slider_init.js', array( 'jquery' ));
|
710 |
+
|
711 |
+
$posts = $cat = $out = '';
|
712 |
+
$this_id = get_the_ID();
|
713 |
+
|
714 |
+
extract(shortcode_atts(array(
|
715 |
+
'posts' => 4,
|
716 |
+
'cat' => ''
|
717 |
+
), $atts));
|
718 |
+
|
719 |
+
if(!empty($cat)) {
|
720 |
+
$cats = explode(", ", $cat);
|
721 |
+
$args = array(
|
722 |
+
'orderby' => 'date',
|
723 |
+
'order' => 'DESC',
|
724 |
+
'post_type' => 'post',
|
725 |
+
'post_status' => 'publish',
|
726 |
+
'post__not_in' => array($this_id),
|
727 |
+
'ignore_sticky_posts' => true,
|
728 |
+
'posts_per_page'=> $posts,
|
729 |
+
'tax_query' => array(
|
730 |
+
array(
|
731 |
+
'taxonomy' => 'category',
|
732 |
+
'field' => 'slug',
|
733 |
+
'terms' => $cats
|
734 |
)
|
735 |
+
)
|
736 |
+
);
|
737 |
+
} else {
|
738 |
+
$args = array(
|
739 |
+
'orderby' => 'date',
|
740 |
+
'order' => 'DESC',
|
741 |
+
'post_type' => 'post',
|
742 |
+
'post_status' => 'publish',
|
743 |
+
'post__not_in' => array($this_id),
|
744 |
+
'ignore_sticky_posts' => true,
|
745 |
+
'posts_per_page'=> $posts
|
746 |
+
);
|
747 |
+
}
|
748 |
+
|
749 |
+
$my_query = new WP_Query($args);
|
750 |
+
|
751 |
+
if( $my_query->have_posts() ) {
|
752 |
+
|
753 |
+
$out .= '<div class="flexslider blog-grid blog">
|
754 |
+
<ul class="slides">';
|
755 |
+
|
756 |
+
while ($my_query->have_posts()) : $my_query->the_post();
|
757 |
+
$content = fruitful_load_template_part();
|
758 |
+
|
759 |
+
$out .= '<li>';
|
760 |
+
|
761 |
+
if ( !empty( $content ) ) {
|
762 |
$out .= $content;
|
763 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
764 |
|
765 |
+
$day = get_the_date('d');
|
766 |
+
$month_abr = get_the_date('M');
|
767 |
+
$the_ID = get_the_ID();
|
768 |
+
$post_class = get_post_class();
|
769 |
+
$the_permalink = get_the_permalink();
|
770 |
+
$title = esc_attr( sprintf( __( 'Permalink to %s', 'fruitful' ), the_title_attribute( 'echo=0' ) ) );
|
771 |
+
$the_title = get_the_title();
|
772 |
+
$the_post_thumbnail = get_the_post_thumbnail();
|
773 |
+
if( empty(get_the_excerpt()) ){
|
774 |
+
$the_excerpt = get_the_content();
|
775 |
+
} else {
|
776 |
+
$the_excerpt = get_the_excerpt();
|
777 |
+
}
|
778 |
+
$the_category = get_the_category_list( ', ', 'fruitful' );
|
779 |
+
$comments = get_comments_popup_link( __( 'Leave a comment', 'fruitful' ), __( '1 Comment', 'fruitful' ), __( '% Comments', 'fruitful' ) );
|
780 |
+
|
781 |
+
$out .= '<article id="post-'.$the_ID.'" class="blog_post blog '.implode(' ', $post_class).'">';
|
782 |
+
$out .= '<a href="'.$the_permalink.'" rel="bookmark">
|
783 |
+
<div class="date_of_post updated">
|
784 |
+
<span class="day_post">'.$day.'</span>
|
785 |
+
<span class="month_post">'.$month_abr.'</span>
|
786 |
+
</div>
|
787 |
+
</a>';
|
788 |
+
$out .= '<div class="post-content">
|
789 |
+
<header class="post-header">
|
790 |
+
<h2 class="post-title entry-title">
|
791 |
+
<a href="'.$the_permalink.'" title="'.$title.'" rel="bookmark">'.$the_title.'</a>
|
792 |
+
</h2>
|
793 |
+
</header><!-- .entry-header -->';
|
794 |
+
$out .= '<div class="entry-content">';
|
795 |
+
if ( has_post_thumbnail() && ! post_password_required() ) :
|
796 |
+
$out .='<div class="entry-thumbnail">'
|
797 |
+
.$the_post_thumbnail.
|
798 |
+
'</div>';
|
799 |
+
endif;
|
800 |
+
$out .= do_shortcode($the_excerpt).
|
801 |
+
'</div><!-- .entry-content -->';
|
802 |
+
$out .= '<footer class="entry-meta">
|
803 |
+
<span class="author-link author"><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID' ))).'">'.get_the_author().'</a></span>
|
804 |
+
<span class="cat-links">
|
805 |
+
Posted in '.$the_category.'
|
806 |
+
</span>
|
807 |
+
<span class="comments-link">
|
808 |
+
'.$comments.'
|
809 |
+
</span> ';
|
810 |
+
$out .= '</footer>
|
811 |
+
</div>
|
812 |
+
</article>';
|
813 |
+
$out .= '</li>';
|
814 |
+
}
|
815 |
+
endwhile;
|
816 |
+
$out .= '</ul>';
|
817 |
+
$out .= '</div>';
|
818 |
+
$out .= '<div class="clearfix"></div>';
|
819 |
+
}
|
820 |
+
wp_reset_postdata();
|
821 |
+
return $out;
|
822 |
}
|
823 |
|
824 |
add_shortcode ("fruitful_recent_posts_slider", "fruitful_recent_posts_slider");
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: fruitfulcode
|
|
3 |
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.
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -13,9 +13,6 @@ Add additional content shortcodes: horizontal tabs, vertical tabs, accordion, pr
|
|
13 |
== Description ==
|
14 |
<h3>Demo Website</h3>
|
15 |
http://plugins.fruitfulcode.com/shortcodes/
|
16 |
-
|
17 |
-
https://www.youtube.com/watch?v=kWB7HBeUQ10
|
18 |
-
|
19 |
<h3>Shortcodes</h3>
|
20 |
<ol>
|
21 |
<li><a href="http://plugins.fruitfulcode.com/shortcodes/horizontal-tabs/">Horizontal tabs</a></li>
|
@@ -83,6 +80,21 @@ You can check <a href="http://support.fruitfulcode.com/hc/en-us/sections/2004063
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
= 1.5 =
|
87 |
Release Date 15.01.2016
|
88 |
|
3 |
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.8
|
7 |
+
Stable tag: 1.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
13 |
== Description ==
|
14 |
<h3>Demo Website</h3>
|
15 |
http://plugins.fruitfulcode.com/shortcodes/
|
|
|
|
|
|
|
16 |
<h3>Shortcodes</h3>
|
17 |
<ol>
|
18 |
<li><a href="http://plugins.fruitfulcode.com/shortcodes/horizontal-tabs/">Horizontal tabs</a></li>
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 1.6 =
|
84 |
+
Release Date 11.07.2017
|
85 |
+
|
86 |
+
* Added
|
87 |
+
* Shortcodes support for recent posts content
|
88 |
+
|
89 |
+
* Tested
|
90 |
+
* To WordPress 4.8
|
91 |
+
|
92 |
+
* Fixed
|
93 |
+
* Width tabs on tablets
|
94 |
+
* Slider height
|
95 |
+
* Recent posts and posts slider - fixed resetting post data issue
|
96 |
+
* Recent posts - added fallback for fruitful_load_template_part
|
97 |
+
|
98 |
= 1.5 =
|
99 |
Release Date 15.01.2016
|
100 |
|