Version Description
Release Date: 06.08.2014
-
New features
- Shortcode tabs: New attribute "tabcolor"
- Shortcode infobox: New attribute "alt" for image
- Shortcode vertical tab: New attribute "close"
-
Bugfixes
- Shortcode promo text: shawow type
- Promo text size responsive
- Removed styles for content paragraph
Download this release
Release Info
Developer | fruitfulcode |
Plugin | Fruitful Shortcodes |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.2
- ff-shortcodes.php +1 -1
- includes/shortcodes/css/ffs_style.css +3 -0
- includes/shortcodes/css/fruitful_shortcode_style.css +10 -5
- includes/shortcodes/js/tabs/easy-responsive-tabs.css +5 -1
- includes/shortcodes/js/tabs/easyResponsiveTabs.js +12 -2
- includes/shortcodes/shortcodes.php +35 -18
- readme.txt +15 -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,
|
6 |
-
Version: 1.
|
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,
|
6 |
+
Version: 1.2
|
7 |
Author: fruitfulcode
|
8 |
Author URI: http://fruitfulcode.com
|
9 |
License: GPL2
|
includes/shortcodes/css/ffs_style.css
CHANGED
@@ -220,3 +220,6 @@
|
|
220 |
margin: 0 0 30px;
|
221 |
}
|
222 |
|
|
|
|
|
|
220 |
margin: 0 0 30px;
|
221 |
}
|
222 |
|
223 |
+
@media only screen and (max-width: 480px) {
|
224 |
+
.fruitful_description .text{font-size:20px !important;}
|
225 |
+
}
|
includes/shortcodes/css/fruitful_shortcode_style.css
CHANGED
@@ -361,14 +361,15 @@
|
|
361 |
width: 50%;
|
362 |
bottom: 80%;
|
363 |
max-width: 300px;
|
|
|
364 |
background: #777;
|
365 |
-webkit-box-shadow: 0 -13px 16px #777;
|
366 |
box-shadow: 0 -13px 16px #777;
|
367 |
-webkit-transform: rotate(3deg);
|
368 |
-
-moz-transform: rotate(
|
369 |
-
-o-transform: rotate(
|
370 |
-
-ms-transform: rotate(
|
371 |
-
transform: rotate(
|
372 |
}
|
373 |
|
374 |
.fruitful_description.shadow-type-3 .top_line:after,
|
@@ -392,8 +393,9 @@
|
|
392 |
bottom: 15px;
|
393 |
left: 10px;
|
394 |
width: 50%;
|
395 |
-
top:
|
396 |
max-width:300px;
|
|
|
397 |
background: #777;
|
398 |
-webkit-box-shadow: 0 13px 16px #777;
|
399 |
-moz-box-shadow: 0 13px 16px #777;
|
@@ -428,3 +430,6 @@
|
|
428 |
margin: 0 0 30px;
|
429 |
}
|
430 |
|
|
|
|
|
|
361 |
width: 50%;
|
362 |
bottom: 80%;
|
363 |
max-width: 300px;
|
364 |
+
min-height:4px;
|
365 |
background: #777;
|
366 |
-webkit-box-shadow: 0 -13px 16px #777;
|
367 |
box-shadow: 0 -13px 16px #777;
|
368 |
-webkit-transform: rotate(3deg);
|
369 |
+
-moz-transform: rotate(3deg);
|
370 |
+
-o-transform: rotate(3deg);
|
371 |
+
-ms-transform: rotate(3deg);
|
372 |
+
transform: rotate(3deg);
|
373 |
}
|
374 |
|
375 |
.fruitful_description.shadow-type-3 .top_line:after,
|
393 |
bottom: 15px;
|
394 |
left: 10px;
|
395 |
width: 50%;
|
396 |
+
top: 75%;
|
397 |
max-width:300px;
|
398 |
+
min-height:4px;
|
399 |
background: #777;
|
400 |
-webkit-box-shadow: 0 13px 16px #777;
|
401 |
-moz-box-shadow: 0 13px 16px #777;
|
430 |
margin: 0 0 30px;
|
431 |
}
|
432 |
|
433 |
+
@media only screen and (max-width: 480px) {
|
434 |
+
.fruitful_description .text{font-size:20px !important;}
|
435 |
+
}
|
includes/shortcodes/js/tabs/easy-responsive-tabs.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
margin:10px 0 20px 0;
|
3 |
}
|
4 |
|
5 |
-
.ffs-tabbed-nav ul.resp-tabs-list
|
6 |
margin: 0px;
|
7 |
padding: 0px;
|
8 |
}
|
@@ -159,6 +159,10 @@ h2.resp-accordion:first-child {
|
|
159 |
border-top: 1px solid #c1c1c1 !important;
|
160 |
}
|
161 |
|
|
|
|
|
|
|
|
|
162 |
/*Here your can change the breakpoint to set the accordion, when screen resolution changed*/
|
163 |
@media only screen and (max-width: 768px) {
|
164 |
ul.resp-tabs-list {
|
2 |
margin:10px 0 20px 0;
|
3 |
}
|
4 |
|
5 |
+
.ffs-tabbed-nav ul.resp-tabs-list{
|
6 |
margin: 0px;
|
7 |
padding: 0px;
|
8 |
}
|
159 |
border-top: 1px solid #c1c1c1 !important;
|
160 |
}
|
161 |
|
162 |
+
.resp-easy-accordion .resp-accordion-closed.resp-tab-content-active{
|
163 |
+
display:none
|
164 |
+
}
|
165 |
+
|
166 |
/*Here your can change the breakpoint to set the accordion, when screen resolution changed*/
|
167 |
@media only screen and (max-width: 768px) {
|
168 |
ul.resp-tabs-list {
|
includes/shortcodes/js/tabs/easyResponsiveTabs.js
CHANGED
@@ -101,8 +101,18 @@
|
|
101 |
|
102 |
//keep closed if option = 'closed' or option is 'accordion' and the element is in accordion mode
|
103 |
if(options.closed !== true && !(options.closed === 'accordion' && !$respTabsList.is(':visible')) && !(options.closed === 'tabs' && $respTabsList.is(':visible'))) {
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
//assign proper classes for when tabs mode is activated before making a selection in accordion mode
|
108 |
else {
|
101 |
|
102 |
//keep closed if option = 'closed' or option is 'accordion' and the element is in accordion mode
|
103 |
if(options.closed !== true && !(options.closed === 'accordion' && !$respTabsList.is(':visible')) && !(options.closed === 'tabs' && $respTabsList.is(':visible'))) {
|
104 |
+
//next code are changed for closed all accordion tabs by default
|
105 |
+
//$($respTabs.find('.resp-accordion')[tabNum]).addClass('resp-tab-active');
|
106 |
+
if ($($respTabs[tabNum]).hasClass('resp-easy-accordion')){
|
107 |
+
if ( $($respTabs[tabNum]).find('.resp-tabs-list').attr('data-closed') == 'closed'){
|
108 |
+
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-accordion-closed');
|
109 |
+
} else {
|
110 |
+
$($respTabs.find('.resp-accordion')[tabNum]).addClass('resp-tab-active');
|
111 |
+
$($respTabs.find('.resp-accordion')[tabNum]).next('.resp-tab-content').addClass('resp-tab-content-active');
|
112 |
+
}
|
113 |
+
} else {
|
114 |
+
$($respTabs.find('.resp-tab-content')[tabNum]).addClass('resp-tab-content-active resp-accordion-closed');
|
115 |
+
}
|
116 |
}
|
117 |
//assign proper classes for when tabs mode is activated before making a selection in accordion mode
|
118 |
else {
|
includes/shortcodes/shortcodes.php
CHANGED
@@ -77,13 +77,15 @@ add_shortcode('fruitful_ibox_row', 'fruitful_ibox_row_shortcode');
|
|
77 |
|
78 |
/*Add information box into content block*/
|
79 |
function fruitful_info_box ($atts, $content = null) {
|
80 |
-
$image = $title = $column = $styletext = $out = $link = '';
|
81 |
$last = false;
|
82 |
extract(shortcode_atts(array(
|
83 |
'column' => '',
|
84 |
'title' => '',
|
|
|
85 |
'link' => '#',
|
86 |
'image' => '',
|
|
|
87 |
'icon' => 'fa-check-square-o',
|
88 |
'icon_position' => 'center',
|
89 |
'styletext' => 'font-size:13px; ',
|
@@ -94,35 +96,37 @@ function fruitful_info_box ($atts, $content = null) {
|
|
94 |
|
95 |
$id = 'info-box-' . rand( 1, 100 );
|
96 |
|
97 |
-
if (isset($column)) { $column
|
98 |
-
if (isset($title)) { $title
|
99 |
-
if (isset($
|
100 |
-
if (isset($
|
101 |
-
if (isset($
|
|
|
|
|
102 |
if (isset($last)) { if ($last) $last = 'last'; } else { $last = ''; }
|
103 |
if (isset($icon_position)) { $icon_position = sanitize_html_class($icon_position);}
|
104 |
-
if (isset($icon))
|
105 |
|
106 |
|
107 |
if ($icon_position == 'left') {
|
108 |
-
$styletext
|
109 |
-
$styletitle
|
110 |
} else if ($icon_position == 'right') {
|
111 |
-
$styletext
|
112 |
-
$styletitle
|
113 |
} else {
|
114 |
-
$styletext
|
115 |
-
$styletitle
|
116 |
}
|
117 |
|
118 |
-
$out .= '<div id="'.$id.'" class="'. $column .' ffs-info-box ' . $icon_position . ' ' . $last . '" >';
|
119 |
if (($link != '') && ($link != '#')) {
|
120 |
$out .= '<a href="'.esc_url($link).'">';
|
121 |
}
|
122 |
if (($image != '') || ($icon != '')) {
|
123 |
$out .= '<div class="ffs-icon-box">';
|
124 |
if ($image != '') {
|
125 |
-
$out .= '<img class="icon" src="' . esc_url($image) .'" title="' . $title . '" />';
|
126 |
} else {
|
127 |
if ($icon != '') $out .= '<span class="ffs-icon-container"><i class="fa '. $icon .'" style="'.$styleicon.'"></i></span>';
|
128 |
|
@@ -147,7 +151,7 @@ function fruitful_tabs_shortcode($atts, $content = null) {
|
|
147 |
$output = '';
|
148 |
$tab_titles = array();
|
149 |
$tabs_class = 'tab_titles';
|
150 |
-
shortcode_atts(array('id' => '', 'type' => '', 'width' => '', 'fit' => '', 'widthtab' => ''), $atts, 'fruitful_tabs');
|
151 |
|
152 |
$id = 'ffs-tabbed-' . rand( 1, 100 );
|
153 |
$type = 'default';
|
@@ -161,6 +165,8 @@ function fruitful_tabs_shortcode($atts, $content = null) {
|
|
161 |
if (isset($atts['width'])) { $width = esc_js($atts['width']); }
|
162 |
if (isset($atts['fit'])) { $fit = esc_js($atts['fit']); }
|
163 |
if (isset($atts['widthtab'])) { $widthtab = esc_js($atts['widthtab']); }
|
|
|
|
|
164 |
|
165 |
$output .= '<script type="text/javascript"> ';
|
166 |
$output .= 'jQuery(document).ready(function() { ';
|
@@ -173,13 +179,24 @@ function fruitful_tabs_shortcode($atts, $content = null) {
|
|
173 |
$output .= 'jQuery("#'.$id.'.resp-vtabs .resp-tabs-container").css({"width":cont_width});';
|
174 |
$output .= '}); ';
|
175 |
$output .= '</script>';
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
preg_match_all( '/tab title="([^\"]+)"/i', $content, $matches, PREG_OFFSET_CAPTURE );
|
178 |
if ( isset( $matches[1] ) ) { $tabs = $matches[1]; }
|
179 |
|
180 |
$output .= '<div id="'.$id.'" class="ffs-tabbed-nav">';
|
181 |
-
$output .= '<ul class="resp-tabs-list"
|
182 |
-
if ($type == 'vertical') { $output .= 'style="width:'.$widthtab.'"'; }
|
|
|
|
|
|
|
|
|
|
|
183 |
$output .= '>';
|
184 |
|
185 |
if (count($tabs)) {
|
77 |
|
78 |
/*Add information box into content block*/
|
79 |
function fruitful_info_box ($atts, $content = null) {
|
80 |
+
$image = $title = $column = $class = $styletext = $styletitle = $out = $link = '';
|
81 |
$last = false;
|
82 |
extract(shortcode_atts(array(
|
83 |
'column' => '',
|
84 |
'title' => '',
|
85 |
+
'class' => '',
|
86 |
'link' => '#',
|
87 |
'image' => '',
|
88 |
+
'alt' => '',
|
89 |
'icon' => 'fa-check-square-o',
|
90 |
'icon_position' => 'center',
|
91 |
'styletext' => 'font-size:13px; ',
|
96 |
|
97 |
$id = 'info-box-' . rand( 1, 100 );
|
98 |
|
99 |
+
if (isset($column)) { $column = sanitize_html_class($column); }
|
100 |
+
if (isset($title)) { $title = esc_attr($title); }
|
101 |
+
if (isset($class)) { $class = sanitize_html_class($class); }
|
102 |
+
if (isset($image)) { $image = esc_url ($image); }
|
103 |
+
if (isset($alt)) { $alt = esc_html ($alt); }
|
104 |
+
if (isset($styletext)) { $styletext = esc_html($styletext); }
|
105 |
+
if (isset($styletitle)) { $styletitle = esc_html($styletitle); }
|
106 |
if (isset($last)) { if ($last) $last = 'last'; } else { $last = ''; }
|
107 |
if (isset($icon_position)) { $icon_position = sanitize_html_class($icon_position);}
|
108 |
+
if (isset($icon)) { $icon = sanitize_html_class($icon);}
|
109 |
|
110 |
|
111 |
if ($icon_position == 'left') {
|
112 |
+
$styletext = 'text-align:left; '.$styletext ;
|
113 |
+
$styletitle = 'text-align:left; '.$styletitle ;
|
114 |
} else if ($icon_position == 'right') {
|
115 |
+
$styletext = 'text-align:right; '.$styletext ;
|
116 |
+
$styletitle = 'text-align:right; '.$styletitle ;
|
117 |
} else {
|
118 |
+
$styletext = 'text-align:center; '.$styletext ;
|
119 |
+
$styletitle = 'text-align:center; '.$styletitle ;
|
120 |
}
|
121 |
|
122 |
+
$out .= '<div id="'.$id.'" class="'.$class.' '. $column .' ffs-info-box ' . $icon_position . ' ' . $last . '" >';
|
123 |
if (($link != '') && ($link != '#')) {
|
124 |
$out .= '<a href="'.esc_url($link).'">';
|
125 |
}
|
126 |
if (($image != '') || ($icon != '')) {
|
127 |
$out .= '<div class="ffs-icon-box">';
|
128 |
if ($image != '') {
|
129 |
+
$out .= '<img class="icon" src="' . esc_url($image) .'" title="' . $title . '" alt="' . $alt . '" />';
|
130 |
} else {
|
131 |
if ($icon != '') $out .= '<span class="ffs-icon-container"><i class="fa '. $icon .'" style="'.$styleicon.'"></i></span>';
|
132 |
|
151 |
$output = '';
|
152 |
$tab_titles = array();
|
153 |
$tabs_class = 'tab_titles';
|
154 |
+
extract(shortcode_atts(array('id' => '', 'type' => '', 'width' => '', 'fit' => '', 'widthtab' => '', 'tabcolor' => '#71AFFF', 'closed' => 'true'), $atts, 'fruitful_tabs'));
|
155 |
|
156 |
$id = 'ffs-tabbed-' . rand( 1, 100 );
|
157 |
$type = 'default';
|
165 |
if (isset($atts['width'])) { $width = esc_js($atts['width']); }
|
166 |
if (isset($atts['fit'])) { $fit = esc_js($atts['fit']); }
|
167 |
if (isset($atts['widthtab'])) { $widthtab = esc_js($atts['widthtab']); }
|
168 |
+
if (isset($atts['tabcolor'])) { $tabcolor = esc_html($atts['tabcolor']); }
|
169 |
+
if (isset($atts['closed'])) { $closed = esc_html($atts['closed']); }
|
170 |
|
171 |
$output .= '<script type="text/javascript"> ';
|
172 |
$output .= 'jQuery(document).ready(function() { ';
|
179 |
$output .= 'jQuery("#'.$id.'.resp-vtabs .resp-tabs-container").css({"width":cont_width});';
|
180 |
$output .= '}); ';
|
181 |
$output .= '</script>';
|
182 |
+
$output .= '<style>'."\n";
|
183 |
+
$output .= '#'.$id.' li.resp-tab-active,'."\n";
|
184 |
+
$output .= '#'.$id.' .resp-tabs-list li:hover{border-top-color:'.$tabcolor.'; border-bottom-color:'.$tabcolor.';}'."\n";
|
185 |
+
$output .= '#'.$id.'.resp-vtabs li.resp-tab-active,'."\n";
|
186 |
+
$output .= '#'.$id.'.resp-vtabs .resp-tabs-list li:hover{border-left-color:'.$tabcolor.'; border-top-color:#C1C1C1; border-right-color:'.$tabcolor.'; border-bottom-color:#C1C1C1;}'."\n";
|
187 |
+
$output .= '</style>';
|
188 |
|
189 |
preg_match_all( '/tab title="([^\"]+)"/i', $content, $matches, PREG_OFFSET_CAPTURE );
|
190 |
if ( isset( $matches[1] ) ) { $tabs = $matches[1]; }
|
191 |
|
192 |
$output .= '<div id="'.$id.'" class="ffs-tabbed-nav">';
|
193 |
+
$output .= '<ul class="resp-tabs-list"';
|
194 |
+
if ($type == 'vertical') { $output .= ' style="width:'.$widthtab.'"'; }
|
195 |
+
if ($type == 'accordion') {
|
196 |
+
if ($closed == 'true') {
|
197 |
+
$output .= ' data-closed="closed"';
|
198 |
+
}
|
199 |
+
}
|
200 |
$output .= '>';
|
201 |
|
202 |
if (count($tabs)) {
|
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
|
5 |
Requires at least: 3.4.1
|
6 |
Tested up to: 3.9.1
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -78,6 +78,20 @@ You can check <a href="http://support.fruitfulcode.com/hc/en-us/sections/2004063
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
= 1.1 =
|
82 |
Release Date: 05.06.2014
|
83 |
|
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
|
5 |
Requires at least: 3.4.1
|
6 |
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 1.2 =
|
82 |
+
Release Date: 06.08.2014
|
83 |
+
|
84 |
+
* New features
|
85 |
+
* Shortcode tabs: New attribute "tabcolor"
|
86 |
+
* Shortcode infobox: New attribute "alt" for image
|
87 |
+
* Shortcode vertical tab: New attribute "close"
|
88 |
+
|
89 |
+
* Bugfixes
|
90 |
+
* Shortcode promo text: shawow type
|
91 |
+
* Promo text size responsive
|
92 |
+
* Removed styles for content paragraph
|
93 |
+
|
94 |
+
|
95 |
= 1.1 =
|
96 |
Release Date: 05.06.2014
|
97 |
|