Version Description
- Tested to work in WordPress 4.1!
- Allow non-English characters in [table-wrap], [media-object], [img], [thumbnail], [modal], [tab], and [collapse]
- Better compatibility with Visual Composer (Thanks, jannejava!)
- [tabs] and [tab], fix defaulting the first tab as "active" if no tabs are explicitly set as "active"
Download this release
Release Info
Developer | FoolsRun |
Plugin | Bootstrap Shortcodes for WordPress |
Version | 3.3.5 |
Comparing to | |
See all releases |
Code changes from version 3.3.4 to 3.3.5
- bootstrap-shortcodes.php +7 -7
- includes/actions-filters.php +2 -2
- readme.txt +8 -2
bootstrap-shortcodes.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Bootstrap 3 Shortcodes
|
4 |
Plugin URI: http://wp-snippets.com/freebies/bootstrap-shortcodes or https://github.com/filipstefansson/bootstrap-shortcodes
|
5 |
Description: The plugin adds a shortcodes for all Bootstrap elements.
|
6 |
-
Version: 3.3.
|
7 |
Author: Filip Stefansson, Simon Yeldon, and Michael W. Delaney
|
8 |
Author URI:
|
9 |
License: GPL2
|
@@ -1183,7 +1183,7 @@ class BoostrapShortcodes {
|
|
1183 |
$tabs[] = sprintf(
|
1184 |
'<li%s><a href="#%s" data-toggle="tab">%s</a></li>',
|
1185 |
( !empty($tab["tab"]["active"]) || ($GLOBALS['tabs_default_active'] && $i == 0) ) ? ' class="active"' : '',
|
1186 |
-
'custom-tab-' . $GLOBALS['tabs_count'] . '-' .
|
1187 |
$tab["tab"]["title"]
|
1188 |
);
|
1189 |
$i++;
|
@@ -1219,7 +1219,7 @@ class BoostrapShortcodes {
|
|
1219 |
), $atts );
|
1220 |
|
1221 |
if( $GLOBALS['tabs_default_active'] && $GLOBALS['tabs_default_count'] == 0 ) {
|
1222 |
-
$active = true;
|
1223 |
}
|
1224 |
$GLOBALS['tabs_default_count']++;
|
1225 |
|
@@ -1228,7 +1228,7 @@ class BoostrapShortcodes {
|
|
1228 |
$class .= ( $atts['active'] == 'true' ) ? ' active' : '';
|
1229 |
$class .= ( $atts['active'] == 'true' && $atts['fade'] == 'true' ) ? ' in' : '';
|
1230 |
|
1231 |
-
$id = 'custom-tab-'. $GLOBALS['tabs_count'] . '-'.
|
1232 |
|
1233 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1234 |
|
@@ -1312,7 +1312,7 @@ class BoostrapShortcodes {
|
|
1312 |
$a_class .= ( $atts['active'] == 'true' ) ? '' : 'collapsed';
|
1313 |
|
1314 |
$parent = 'custom-collapse-'. $GLOBALS['collapsibles_count'];
|
1315 |
-
$current_collapse = $parent . '-'.
|
1316 |
|
1317 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1318 |
|
@@ -1851,7 +1851,7 @@ function bs_popover( $atts, $content = null ) {
|
|
1851 |
$div_class = 'modal fade';
|
1852 |
$div_class .= ( $atts['size'] ) ? ' bs-modal-' . $atts['size'] : '';
|
1853 |
|
1854 |
-
$id = 'custom-modal-' .
|
1855 |
|
1856 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1857 |
|
@@ -1978,7 +1978,7 @@ function bs_popover( $atts, $content = null ) {
|
|
1978 |
$previous_value = libxml_use_internal_errors(TRUE);
|
1979 |
|
1980 |
$dom = new DOMDocument;
|
1981 |
-
$dom->loadHTML($content);
|
1982 |
|
1983 |
libxml_clear_errors();
|
1984 |
libxml_use_internal_errors($previous_value);
|
3 |
Plugin Name: Bootstrap 3 Shortcodes
|
4 |
Plugin URI: http://wp-snippets.com/freebies/bootstrap-shortcodes or https://github.com/filipstefansson/bootstrap-shortcodes
|
5 |
Description: The plugin adds a shortcodes for all Bootstrap elements.
|
6 |
+
Version: 3.3.5
|
7 |
Author: Filip Stefansson, Simon Yeldon, and Michael W. Delaney
|
8 |
Author URI:
|
9 |
License: GPL2
|
1183 |
$tabs[] = sprintf(
|
1184 |
'<li%s><a href="#%s" data-toggle="tab">%s</a></li>',
|
1185 |
( !empty($tab["tab"]["active"]) || ($GLOBALS['tabs_default_active'] && $i == 0) ) ? ' class="active"' : '',
|
1186 |
+
'custom-tab-' . $GLOBALS['tabs_count'] . '-' . md5($tab["tab"]["title"]),
|
1187 |
$tab["tab"]["title"]
|
1188 |
);
|
1189 |
$i++;
|
1219 |
), $atts );
|
1220 |
|
1221 |
if( $GLOBALS['tabs_default_active'] && $GLOBALS['tabs_default_count'] == 0 ) {
|
1222 |
+
$atts['active'] = true;
|
1223 |
}
|
1224 |
$GLOBALS['tabs_default_count']++;
|
1225 |
|
1228 |
$class .= ( $atts['active'] == 'true' ) ? ' active' : '';
|
1229 |
$class .= ( $atts['active'] == 'true' && $atts['fade'] == 'true' ) ? ' in' : '';
|
1230 |
|
1231 |
+
$id = 'custom-tab-'. $GLOBALS['tabs_count'] . '-'. md5( $atts['title'] );
|
1232 |
|
1233 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1234 |
|
1312 |
$a_class .= ( $atts['active'] == 'true' ) ? '' : 'collapsed';
|
1313 |
|
1314 |
$parent = 'custom-collapse-'. $GLOBALS['collapsibles_count'];
|
1315 |
+
$current_collapse = $parent . '-'. md5( $atts['title'] );
|
1316 |
|
1317 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1318 |
|
1851 |
$div_class = 'modal fade';
|
1852 |
$div_class .= ( $atts['size'] ) ? ' bs-modal-' . $atts['size'] : '';
|
1853 |
|
1854 |
+
$id = 'custom-modal-' . md5( $atts['title'] );
|
1855 |
|
1856 |
$data_props = $this->parse_data_attributes( $atts['data'] );
|
1857 |
|
1978 |
$previous_value = libxml_use_internal_errors(TRUE);
|
1979 |
|
1980 |
$dom = new DOMDocument;
|
1981 |
+
$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'));
|
1982 |
|
1983 |
libxml_clear_errors();
|
1984 |
libxml_use_internal_errors($previous_value);
|
includes/actions-filters.php
CHANGED
@@ -13,7 +13,7 @@ add_action( 'admin_enqueue_scripts', 'bootstrap_shortcodes_styles_all' );
|
|
13 |
|
14 |
function bootstrap_shortcodes_help_styles() {
|
15 |
$screen = get_current_screen();
|
16 |
-
if($screen->parent_base != "gf_edit_forms") {
|
17 |
wp_register_style( 'bs-font', plugins_url( 'bootstrap-3-shortcodes/includes/help/bs-font.css' ) );
|
18 |
wp_register_style( 'bootstrap-shortcodes-help', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-shortcodes-help.css' ) );
|
19 |
wp_register_style( 'bootstrap-modal', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-modal.css' ) );
|
@@ -32,7 +32,7 @@ add_filter('the_content', 'bs_fix_shortcodes');
|
|
32 |
//action to add a custom button to the content editor
|
33 |
function add_bootstrap_button() {
|
34 |
$screen = get_current_screen();
|
35 |
-
if($screen->parent_base != "gf_edit_forms") {
|
36 |
//the id of the container I want to show in the popup
|
37 |
$popup_id = 'bootstrap-shortcodes-help';
|
38 |
|
13 |
|
14 |
function bootstrap_shortcodes_help_styles() {
|
15 |
$screen = get_current_screen();
|
16 |
+
if($screen != null && $screen->parent_base != "gf_edit_forms") {
|
17 |
wp_register_style( 'bs-font', plugins_url( 'bootstrap-3-shortcodes/includes/help/bs-font.css' ) );
|
18 |
wp_register_style( 'bootstrap-shortcodes-help', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-shortcodes-help.css' ) );
|
19 |
wp_register_style( 'bootstrap-modal', plugins_url( 'bootstrap-3-shortcodes/includes/help/css/bootstrap-modal.css' ) );
|
32 |
//action to add a custom button to the content editor
|
33 |
function add_bootstrap_button() {
|
34 |
$screen = get_current_screen();
|
35 |
+
if($screen != null && $screen->parent_base != "gf_edit_forms") {
|
36 |
//the id of the container I want to show in the popup
|
37 |
$popup_id = 'bootstrap-shortcodes-help';
|
38 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: filipstefansson, nodley, FoolsRun
|
3 |
Tags: bootstrap, shortcode, shortcodes, responsive, grid
|
4 |
Requires at least: 3.8
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 3.3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -71,6 +71,12 @@ No, we assume you are already working with a WordPress theme that includes the B
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 3.3.4 =
|
75 |
* Restore Bootstrap 3.2 backwards compatibility for [media-object] shortcode, updated documentation to use Bootstrap 3.3 example, but offer 3.2 options.
|
76 |
* Add "collapsed" class to non-active [collapse] elements (thanks, Artem!)
|
2 |
Contributors: filipstefansson, nodley, FoolsRun
|
3 |
Tags: bootstrap, shortcode, shortcodes, responsive, grid
|
4 |
Requires at least: 3.8
|
5 |
+
Tested up to: 4.1
|
6 |
+
Stable tag: 3.3.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 3.3.5 =
|
75 |
+
* Tested to work in WordPress 4.1!
|
76 |
+
* Allow non-English characters in [table-wrap], [media-object], [img], [thumbnail], [modal], [tab], and [collapse]
|
77 |
+
* Better compatibility with Visual Composer (Thanks, jannejava!)
|
78 |
+
* [tabs] and [tab], fix defaulting the first tab as "active" if no tabs are explicitly set as "active"
|
79 |
+
|
80 |
= 3.3.4 =
|
81 |
* Restore Bootstrap 3.2 backwards compatibility for [media-object] shortcode, updated documentation to use Bootstrap 3.3 example, but offer 3.2 options.
|
82 |
* Add "collapsed" class to non-active [collapse] elements (thanks, Artem!)
|