Bootstrap Shortcodes for WordPress - Version 3.2.4

Version Description

  • NOTE: this update changes the way the [table-wrap], [tooltip], [popover], [page-header], [img], and [media-object] shortcodes function to better correct for unexpected input. Please report any problems you have with these shortcodes following this update.
  • Add Bootstrap shortcode help popup button to Distraction Free Writing Mode toolbar
  • Better responsive styles for help popup button on smaller screens
  • Better correction for malformed or unexpected input in [table-wrap], [tooltip], [popover], [page-header], [img], and [media-object]s
  • Fix display problems for WP-Engine users
  • Fix documentation for [popover]
  • Better handling of Gravity Forms' "No Conflict Mode"
  • Fix conflict with All-In-One Events Calendar
  • Fix for some situations where the help-tab popup would be behind other popup elements.
  • WordPress 4.0 support!
Download this release

Release Info

Developer FoolsRun
Plugin Icon Bootstrap Shortcodes for WordPress
Version 3.2.4
Comparing to
See all releases

Code changes from version 3.2.3 to 3.2.4

Gruntfile.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = function(grunt) {
2
+
3
+ grunt.initConfig({
4
+ pkg: grunt.file.readJSON('package.json'),
5
+ markdown: {
6
+ all: {
7
+ files: [
8
+ {
9
+ expand: true,
10
+ src: 'README.md',
11
+ dest: 'includes/help/',
12
+ ext: '.html'
13
+ }
14
+ ]
15
+ },
16
+ options: {
17
+ template: 'includes/help/README.jst',
18
+ postCompile: function(src, contect) {
19
+ grunt.log.write('Generating HTML from README.md...').ok()
20
+ }
21
+ }
22
+ }
23
+ });
24
+
25
+ grunt.loadNpmTasks('grunt-markdown');
26
+
27
+ grunt.registerTask('default', ['markdown']);
28
+
29
+ }
README.md CHANGED
@@ -6,7 +6,7 @@ WordPress plugin that provides shortcodes for easier use of the Bootstrap styles
6
  ## Requirements
7
  This plugin won't do anything if you don't have WordPress theme built with the [Bootstrap](http://getbootstrap.com/) framework. **This plugin does not include the Bootstrap framework**.
8
 
9
- The plugin is tested to work with ```Bootstrap 3.2``` and ```WordPress 3.9```.
10
 
11
  This plugin contains a ```composer.json``` file for those of you who manage your PHP dependencies with [Composer](https://getcomposer.org).
12
 
@@ -56,10 +56,10 @@ This plugin contains a ```composer.json``` file for those of you who manage your
56
  ### Grid
57
  [row]
58
  [column md="6"]
59
-
60
  [/column]
61
  [column md="6"]
62
-
63
  [/column]
64
  [/row]
65
 
@@ -68,10 +68,10 @@ The container component is also supported in case your theme doesn't incude a co
68
  [container]
69
  [row]
70
  [column md="6"]
71
-
72
  [/column]
73
  [column md="6"]
74
-
75
  [/column]
76
  [/row]
77
  [/container]
@@ -116,7 +116,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
116
  * * *
117
 
118
  ### Lead body copy
119
- [lead] [/lead]
120
 
121
  #### [lead] parameters
122
  Parameter | Description | Required | Values | Default
@@ -129,7 +129,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
129
  * * *
130
 
131
  ### Emphasis classes
132
- [emphasis type="success"] [/emphasis]
133
 
134
  #### [emphasis] parameters
135
  Parameter | Description | Required | Values | Default
@@ -143,7 +143,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
143
  * * *
144
 
145
  ### Code
146
- [code] [/code]
147
 
148
  #### [code] parameters
149
  Parameter | Description | Required | Values | Default
@@ -179,7 +179,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
179
  * * *
180
 
181
  ### Buttons
182
- [button type="success" size="lg" link="#"] [/button]
183
 
184
  #### [button] parameters
185
  Parameter | Description | Required | Values | Default
@@ -200,7 +200,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
200
  * * *
201
 
202
  ### Images
203
- [img type="circle" responsive="true"] [/img]
204
 
205
  Wrap any number of HTML image tags or images inserted via the WordPress media manager.
206
  #### [img] parameters
@@ -216,7 +216,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
216
  * * *
217
 
218
  ### Responsive Utilities
219
- [responsive visible_block="lg md" hidden="sn xs"] [/responsive]
220
 
221
  #### [reponsive] parameters
222
  Parameter | Description | Required | Values | Default
@@ -252,25 +252,25 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
252
  ### Button Groups
253
  #### Basic example
254
  [button-group size="lg" justified="" vertical=""]
255
- [button link="#"] [/button]
256
- [button link="#"] [/button]
257
- [button link="#"] [/button]
258
  [/button-group]
259
 
260
  #### Button toolbar
261
  [button-toolbar]
262
  [button-group]
263
- [button link="#"] [/button]
264
- [button link="#"] [/button]
265
- [button link="#"] [/button]
266
  [/button-group]
267
  [button-group]
268
- [button link="#"] [/button]
269
- [button link="#"] [/button]
270
- [button link="#"] [/button]
271
  [/button-group]
272
  [button-group]
273
- [button link="#"] [/button]
274
  [/button-group]
275
  [/button-toolbar]
276
 
@@ -299,36 +299,36 @@ Button Dropdowns can be accomplished by combining the [button-group] shortcode,
299
 
300
  #### Single button dropdowns
301
  [button-group]
302
- [button link="#" dropdown="true" data="toggle,dropdown"] [caret][/button]
303
  [dropdown]
304
- [dropdown-header] [/dropdown-header]
305
- [dropdown-item link="#"] [/dropdown-item]
306
- [dropdown-item link="#"] [/dropdown-item]
307
- [dropdown-item link="#"] [/dropdown-item]
308
  [divider]
309
- [dropdown-item link="#"] [/dropdown-item]
310
  [/dropdown]
311
  [/button-group]
312
 
313
  #### Split button dropdowns
314
  [button-group]
315
- [button link="#"] [/button]
316
  [button dropdown="true" data="toggle,dropdown"][caret][/button]
317
  [dropdown]
318
- [dropdown-item link="#"] [/dropdown-item]
319
  [divider]
320
- [dropdown-item link="#"] [/dropdown-item]
321
  [/dropdown]
322
  [/button-group]
323
 
324
  #### Dropup variation
325
  [button-group dropup="true"]
326
- [button link="#"] [/button]
327
  [button dropdown="true" data="toggle,dropdown"][caret][/button]
328
  [dropdown]
329
- [dropdown-item link="#"] [/dropdown-item]
330
  [divider]
331
- [dropdown-item link="#"] [/dropdown-item]
332
  [/dropdown]
333
  [/button-group]
334
 
@@ -370,18 +370,18 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
370
 
371
  ### Navs
372
  [nav type="pills"]
373
- [nav-item link="#"] [/nav-item]
374
- [nav-item link="#"] [/nav-item]
375
- [nav-item link="#"] [/nav-item]
376
  [/nav]
377
 
378
  #### Nav with dropdowns
379
  [nav type="pills"]
380
- [nav-item link="#" active="true"] [/nav-item]
381
- [nav-item dropdown="true" link="#"] [caret]
382
  [dropdown]
383
- [dropdown-item link="#"] [/dropdown-item]
384
- [dropdown-item link="#"] [/dropdown-item]
385
  [/dropdown]
386
  [/nav-item]
387
  [/nav]
@@ -410,9 +410,9 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
410
 
411
  ### Breadcrumbs
412
  [breadcrumb]
413
- [breadcrumb-item link="#"] [/breadcrumb-item]
414
- [breadcrumb-item link="#"] [/breadcrumb-item]
415
- [breadcrumb-item link="#"] [/breadcrumb-item]
416
  [/breadcrumb]
417
 
418
  #### [breadcrumb] parameters
@@ -433,7 +433,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
433
  * * *
434
 
435
  ### Labels
436
- [label type="success"] [/label]
437
 
438
  #### [label] parameters
439
  Parameter | Description | Required | Values | Default
@@ -447,7 +447,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
447
  * * *
448
 
449
  ### Badges
450
- [badge right="true"] [/badge]
451
 
452
  #### [badge] parameters
453
  Parameter | Description | Required | Values | Default
@@ -461,7 +461,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
461
  * * *
462
 
463
  ### Jumbotron
464
- [jumbotron title="My Jumbotron"] [/jumbotron]
465
 
466
  #### [jumbotron] parameters
467
  Parameter | Description | Required | Values | Default
@@ -475,7 +475,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
475
  * * *
476
 
477
  ### Page Header
478
- [page-header] [/page-header]
479
 
480
  Automatically inserts H1 tag if not present
481
  #### [page-header] parameters
@@ -489,13 +489,14 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
489
  * * *
490
 
491
  ### Thumbnails
492
- [thumbnail] [/thumbnail]
493
- [thumbnail] [/thumbnail]
494
- [thumbnail] [/thumbnail]
495
 
496
  #### [thumbnail] parameters
497
  Parameter | Description | Required | Values | Default
498
  --- | --- | --- | --- | ---
 
499
  xclass | Any extra classes you want to add | optional | any text | none
500
  data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at [Button Dropdowns](#button-dropdowns)). | optional | any text | none
501
 
@@ -504,7 +505,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
504
  * * *
505
 
506
  ### Alerts
507
- [alert type="success"] [/alert]
508
 
509
  #### [alert] parameters
510
  Parameter | Description | Required | Values | Default
@@ -548,10 +549,10 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
548
  ### Media Objects
549
  [media]
550
  [media-object pull="right"]
551
-
552
  [/media-object]
553
  [media-body title="Testing"]
554
-
555
  [/media-body]
556
  [/media]
557
 
@@ -586,42 +587,42 @@ __NOTE: media-object should contain an image, or linked image, inserted using th
586
  #### Basic Example
587
  [list-group]
588
  [list-group-item]
589
-
590
  [/list-group-item]
591
  [list-group-item]
592
-
593
  [/list-group-item]
594
  [list-group-item]
595
-
596
  [/list-group-item]
597
  [/list-group]
598
 
599
  #### Linked Items
600
  [list-group linked="true"]
601
  [list-group-item link="#" active="true"]
602
-
603
  [/list-group-item]
604
  [list-group-item link="#"]
605
-
606
  [/list-group-item]
607
  [list-group-item link="#"]
608
-
609
  [/list-group-item]
610
  [/list-group]
611
 
612
  #### Custom Content
613
  [list-group linked="true"]
614
  [list-group-item link="#" active="true"]
615
- [list-group-item-heading][/list-group-item-heading]
616
- [list-group-item-text][/list-group-item-text]
617
  [/list-group-item]
618
  [list-group-item link="#"]
619
- [list-group-item-heading][/list-group-item-heading]
620
- [list-group-item-text][/list-group-item-text]
621
  [/list-group-item]
622
  [list-group-item link="#"]
623
- [list-group-item-heading][/list-group-item-heading]
624
- [list-group-item-text][/list-group-item-text]
625
  [/list-group-item]
626
  [/list-group]
627
 
@@ -659,7 +660,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
659
  * * *
660
 
661
  ### Panels
662
- [panel type="info" heading="Panel Title" footer="Footer text"] [/panel]
663
 
664
  #### [panel] parameters
665
  Parameter | Description | Required | Values | Default
@@ -676,7 +677,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
676
  * * *
677
 
678
  ### Wells
679
- [well size="sm"] [/well]
680
 
681
  #### [well] parameters
682
  Parameter | Description | Required | Values | Default
@@ -694,13 +695,13 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
694
  ### Tabs
695
  [tabs type="tabs"]
696
  [tab title="Home" active="true"]
697
-
698
  [/tab]
699
  [tab title="Profile"]
700
-
701
  [/tab]
702
  [tab title="Messages"]
703
-
704
  [/tab]
705
  [/tabs]
706
 
@@ -725,7 +726,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
725
  * * *
726
 
727
  ### Tooltip
728
- [tooltip title="I'm the title" placement="right"] [/tooltip]
729
 
730
  #### [tooltip] parameters
731
  Parameter | Description | Required | Values | Default
@@ -740,7 +741,7 @@ html | Insert HTML into the tooltip | optional | true, false | false
740
  * * *
741
 
742
  ### Popover
743
- [popover title="I'm the title" content="And here's some amazing content. It's very engaging. right?" placement="right"] [/popover]
744
 
745
  #### [popover] parameters
746
  Parameter | Description | Required | Values | Default
@@ -758,13 +759,13 @@ html | Insert HTML into the tooltip | optional | true, false | false
758
  ### Collapse
759
  [collapsibles]
760
  [collapse title="Collapse 1" active="true"]
761
-
762
  [/collapse]
763
  [collapse title="Collapse 2"]
764
-
765
  [/collapse]
766
  [collapse title="Collapse 3"]
767
-
768
  [/collapse]
769
  [/collapsibles]
770
 
@@ -789,9 +790,9 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
789
 
790
  ### Carousel
791
  [carousel]
792
- [carousel-item active="true"] [/carousel-item]
793
- [carousel-item] [/carousel-item]
794
- [carousel-item] [/carousel-item]
795
  [/carousel]
796
 
797
  [carousel-item] wraps an HTML image tag or image inserted via the WordPress editor.
@@ -817,7 +818,7 @@ data | Data attribute and value pairs separated by a comma. Pairs separated by p
817
 
818
  ### Modal
819
  [modal text="This is my modal" title="Modal Title Goes Here" xclass="btn btn-primary btn-large"]
820
-
821
  [modal-footer]
822
  [button type="primary" link="#" data="dismiss,modal"]Dismiss[/button]
823
  [/modal-footer]
6
  ## Requirements
7
  This plugin won't do anything if you don't have WordPress theme built with the [Bootstrap](http://getbootstrap.com/) framework. **This plugin does not include the Bootstrap framework**.
8
 
9
+ The plugin is tested to work with ```Bootstrap 3.2``` and ```WordPress 4.0```.
10
 
11
  This plugin contains a ```composer.json``` file for those of you who manage your PHP dependencies with [Composer](https://getcomposer.org).
12
 
56
  ### Grid
57
  [row]
58
  [column md="6"]
59
+ ...
60
  [/column]
61
  [column md="6"]
62
+ ...
63
  [/column]
64
  [/row]
65
 
68
  [container]
69
  [row]
70
  [column md="6"]
71
+ ...
72
  [/column]
73
  [column md="6"]
74
+ ...
75
  [/column]
76
  [/row]
77
  [/container]
116
  * * *
117
 
118
  ### Lead body copy
119
+ [lead] ... [/lead]
120
 
121
  #### [lead] parameters
122
  Parameter | Description | Required | Values | Default
129
  * * *
130
 
131
  ### Emphasis classes
132
+ [emphasis type="success"] ... [/emphasis]
133
 
134
  #### [emphasis] parameters
135
  Parameter | Description | Required | Values | Default
143
  * * *
144
 
145
  ### Code
146
+ [code] ... [/code]
147
 
148
  #### [code] parameters
149
  Parameter | Description | Required | Values | Default
179
  * * *
180
 
181
  ### Buttons
182
+ [button type="success" size="lg" link="#"] ... [/button]
183
 
184
  #### [button] parameters
185
  Parameter | Description | Required | Values | Default
200
  * * *
201
 
202
  ### Images
203
+ [img type="circle" responsive="true"] ... [/img]
204
 
205
  Wrap any number of HTML image tags or images inserted via the WordPress media manager.
206
  #### [img] parameters
216
  * * *
217
 
218
  ### Responsive Utilities
219
+ [responsive visible_block="lg md" hidden="sn xs"] ... [/responsive]
220
 
221
  #### [reponsive] parameters
222
  Parameter | Description | Required | Values | Default
252
  ### Button Groups
253
  #### Basic example
254
  [button-group size="lg" justified="" vertical=""]
255
+ [button link="#"] ... [/button]
256
+ [button link="#"] ... [/button]
257
+ [button link="#"] ... [/button]
258
  [/button-group]
259
 
260
  #### Button toolbar
261
  [button-toolbar]
262
  [button-group]
263
+ [button link="#"] ... [/button]
264
+ [button link="#"] ... [/button]
265
+ [button link="#"] ... [/button]
266
  [/button-group]
267
  [button-group]
268
+ [button link="#"] ... [/button]
269
+ [button link="#"] ... [/button]
270
+ [button link="#"] ... [/button]
271
  [/button-group]
272
  [button-group]
273
+ [button link="#"] ... [/button]
274
  [/button-group]
275
  [/button-toolbar]
276
 
299
 
300
  #### Single button dropdowns
301
  [button-group]
302
+ [button link="#" dropdown="true" data="toggle,dropdown"] ... [caret][/button]
303
  [dropdown]
304
+ [dropdown-header] ... [/dropdown-header]
305
+ [dropdown-item link="#"] ... [/dropdown-item]
306
+ [dropdown-item link="#"] ... [/dropdown-item]
307
+ [dropdown-item link="#"] ... [/dropdown-item]
308
  [divider]
309
+ [dropdown-item link="#"] ... [/dropdown-item]
310
  [/dropdown]
311
  [/button-group]
312
 
313
  #### Split button dropdowns
314
  [button-group]
315
+ [button link="#"] ... [/button]
316
  [button dropdown="true" data="toggle,dropdown"][caret][/button]
317
  [dropdown]
318
+ [dropdown-item link="#"] ... [/dropdown-item]
319
  [divider]
320
+ [dropdown-item link="#"] ... [/dropdown-item]
321
  [/dropdown]
322
  [/button-group]
323
 
324
  #### Dropup variation
325
  [button-group dropup="true"]
326
+ [button link="#"] ... [/button]
327
  [button dropdown="true" data="toggle,dropdown"][caret][/button]
328
  [dropdown]
329
+ [dropdown-item link="#"] ... [/dropdown-item]
330
  [divider]
331
+ [dropdown-item link="#"] ... [/dropdown-item]
332
  [/dropdown]
333
  [/button-group]
334
 
370
 
371
  ### Navs
372
  [nav type="pills"]
373
+ [nav-item link="#"] ... [/nav-item]
374
+ [nav-item link="#"] ... [/nav-item]
375
+ [nav-item link="#"] ... [/nav-item]
376
  [/nav]
377
 
378
  #### Nav with dropdowns
379
  [nav type="pills"]
380
+ [nav-item link="#" active="true"] ... [/nav-item]
381
+ [nav-item dropdown="true" link="#"] ... [caret]
382
  [dropdown]
383
+ [dropdown-item link="#"] ... [/dropdown-item]
384
+ [dropdown-item link="#"] ... [/dropdown-item]
385
  [/dropdown]
386
  [/nav-item]
387
  [/nav]
410
 
411
  ### Breadcrumbs
412
  [breadcrumb]
413
+ [breadcrumb-item link="#"] ... [/breadcrumb-item]
414
+ [breadcrumb-item link="#"] ... [/breadcrumb-item]
415
+ [breadcrumb-item link="#"] ... [/breadcrumb-item]
416
  [/breadcrumb]
417
 
418
  #### [breadcrumb] parameters
433
  * * *
434
 
435
  ### Labels
436
+ [label type="success"] ... [/label]
437
 
438
  #### [label] parameters
439
  Parameter | Description | Required | Values | Default
447
  * * *
448
 
449
  ### Badges
450
+ [badge right="true"] ... [/badge]
451
 
452
  #### [badge] parameters
453
  Parameter | Description | Required | Values | Default
461
  * * *
462
 
463
  ### Jumbotron
464
+ [jumbotron title="My Jumbotron"] ... [/jumbotron]
465
 
466
  #### [jumbotron] parameters
467
  Parameter | Description | Required | Values | Default
475
  * * *
476
 
477
  ### Page Header
478
+ [page-header] ... [/page-header]
479
 
480
  Automatically inserts H1 tag if not present
481
  #### [page-header] parameters
489
  * * *
490
 
491
  ### Thumbnails
492
+ [thumbnail] ... [/thumbnail]
493
+ [thumbnail] ... [/thumbnail]
494
+ [thumbnail] ... [/thumbnail]
495
 
496
  #### [thumbnail] parameters
497
  Parameter | Description | Required | Values | Default
498
  --- | --- | --- | --- | ---
499
+ has_content | Set to "true" if this thumbnail contains more than just an image or linked image as in [Bootstrap's thumbnail documentation](http://getbootstrap.com/components/#thumbnails-custom-content). | optional | true, false | false
500
  xclass | Any extra classes you want to add | optional | any text | none
501
  data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at [Button Dropdowns](#button-dropdowns)). | optional | any text | none
502
 
505
  * * *
506
 
507
  ### Alerts
508
+ [alert type="success"] ... [/alert]
509
 
510
  #### [alert] parameters
511
  Parameter | Description | Required | Values | Default
549
  ### Media Objects
550
  [media]
551
  [media-object pull="right"]
552
+ ...
553
  [/media-object]
554
  [media-body title="Testing"]
555
+ ...
556
  [/media-body]
557
  [/media]
558
 
587
  #### Basic Example
588
  [list-group]
589
  [list-group-item]
590
+ ...
591
  [/list-group-item]
592
  [list-group-item]
593
+ ...
594
  [/list-group-item]
595
  [list-group-item]
596
+ ...
597
  [/list-group-item]
598
  [/list-group]
599
 
600
  #### Linked Items
601
  [list-group linked="true"]
602
  [list-group-item link="#" active="true"]
603
+ ...
604
  [/list-group-item]
605
  [list-group-item link="#"]
606
+ ...
607
  [/list-group-item]
608
  [list-group-item link="#"]
609
+ ...
610
  [/list-group-item]
611
  [/list-group]
612
 
613
  #### Custom Content
614
  [list-group linked="true"]
615
  [list-group-item link="#" active="true"]
616
+ [list-group-item-heading]...[/list-group-item-heading]
617
+ [list-group-item-text]...[/list-group-item-text]
618
  [/list-group-item]
619
  [list-group-item link="#"]
620
+ [list-group-item-heading]...[/list-group-item-heading]
621
+ [list-group-item-text]...[/list-group-item-text]
622
  [/list-group-item]
623
  [list-group-item link="#"]
624
+ [list-group-item-heading]...[/list-group-item-heading]
625
+ [list-group-item-text]...[/list-group-item-text]
626
  [/list-group-item]
627
  [/list-group]
628
 
660
  * * *
661
 
662
  ### Panels
663
+ [panel type="info" heading="Panel Title" footer="Footer text"] ... [/panel]
664
 
665
  #### [panel] parameters
666
  Parameter | Description | Required | Values | Default
677
  * * *
678
 
679
  ### Wells
680
+ [well size="sm"] ... [/well]
681
 
682
  #### [well] parameters
683
  Parameter | Description | Required | Values | Default
695
  ### Tabs
696
  [tabs type="tabs"]
697
  [tab title="Home" active="true"]
698
+ ...
699
  [/tab]
700
  [tab title="Profile"]
701
+ ...
702
  [/tab]
703
  [tab title="Messages"]
704
+ ...
705
  [/tab]
706
  [/tabs]
707
 
726
  * * *
727
 
728
  ### Tooltip
729
+ [tooltip title="I'm the title" placement="right"] ... [/tooltip]
730
 
731
  #### [tooltip] parameters
732
  Parameter | Description | Required | Values | Default
741
  * * *
742
 
743
  ### Popover
744
+ [popover title="I'm the title" text="And here's some amazing content. It's very engaging. right?" placement="right"] ... [/popover]
745
 
746
  #### [popover] parameters
747
  Parameter | Description | Required | Values | Default
759
  ### Collapse
760
  [collapsibles]
761
  [collapse title="Collapse 1" active="true"]
762
+ ...
763
  [/collapse]
764
  [collapse title="Collapse 2"]
765
+ ...
766
  [/collapse]
767
  [collapse title="Collapse 3"]
768
+ ...
769
  [/collapse]
770
  [/collapsibles]
771
 
790
 
791
  ### Carousel
792
  [carousel]
793
+ [carousel-item active="true"] ... [/carousel-item]
794
+ [carousel-item] ... [/carousel-item]
795
+ [carousel-item] ... [/carousel-item]
796
  [/carousel]
797
 
798
  [carousel-item] wraps an HTML image tag or image inserted via the WordPress editor.
818
 
819
  ### Modal
820
  [modal text="This is my modal" title="Modal Title Goes Here" xclass="btn btn-primary btn-large"]
821
+ ...
822
  [modal-footer]
823
  [button type="primary" link="#" data="dismiss,modal"]Dismiss[/button]
824
  [/modal-footer]
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.2.3
7
  Author: Filip Stefansson, Simon Yeldon, and Michael W. Delaney
8
  Author URI:
9
  License: GPL2
@@ -1026,23 +1026,19 @@ class BoostrapShortcodes {
1026
  $class .= ( $striped == 'true' ) ? ' table-striped' : '';
1027
  $class .= ( $hover == 'true' ) ? ' table-hover' : '';
1028
  $class .= ( $condensed == 'true' ) ? ' table-condensed' : '';
1029
- $class .= ($xclass) ? ' ' . $xclass : '';
1030
 
1031
- $dom = new DOMDocument;
1032
- $dom->loadXML($content);
1033
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1034
- if( $data ) {
1035
- $data = explode( '|', $data );
1036
- foreach( $data as $d ):
1037
- $d = explode(',',$d);
1038
- $dom->documentElement->setAttribute('data-'.$d[0],trim($d[1]));
1039
- endforeach;
1040
- }
1041
- $return = $dom->saveXML();
1042
  return $return;
1043
  }
1044
-
1045
-
1046
  /*--------------------------------------------------------------------------------------
1047
  *
1048
  * bs_well
@@ -1452,36 +1448,30 @@ class BoostrapShortcodes {
1452
  *
1453
  *-------------------------------------------------------------------------------------*/
1454
 
 
1455
  function bs_tooltip( $atts, $content = null ) {
1456
 
1457
  $defaults = array(
1458
  'title' => '',
1459
  'placement' => 'top',
1460
  'animation' => 'true',
1461
- 'html' => 'false'
 
1462
  );
1463
  extract( shortcode_atts( $defaults, $atts ) );
1464
 
1465
- $class = 'bs-tooltip';
1466
-
1467
- $previous_value = libxml_use_internal_errors(TRUE);
1468
- $dom = new DOMDocument;
1469
- $dom->loadXML($content);
1470
- libxml_clear_errors();
1471
- libxml_use_internal_errors($previous_value);
1472
- if(!$dom->documentElement) {
1473
- $element = $dom->createElement('span', $content);
1474
- $dom->appendChild($element);
1475
- }
1476
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1477
- $dom->documentElement->setAttribute('title', $title );
1478
- if($animation) { $dom->documentElement->setAttribute('data-animation', $animation ); }
1479
- if($placement) { $dom->documentElement->setAttribute('data-placement', $placement ); }
1480
- if($html) { $dom->documentElement->setAttribute('data-html', $html ); }
1481
-
1482
- $return = $dom->saveXML();
1483
 
 
 
 
 
 
 
 
 
1484
  return $return;
 
1485
  }
1486
 
1487
  /*--------------------------------------------------------------------------------------
@@ -1498,32 +1488,25 @@ function bs_popover( $atts, $content = null ) {
1498
  'text' => '',
1499
  'placement' => 'top',
1500
  'animation' => 'true',
1501
- 'html' => 'false'
 
1502
  );
1503
  extract( shortcode_atts( $defaults, $atts ) );
1504
 
1505
  $class = 'bs-popover';
1506
-
1507
- $previous_value = libxml_use_internal_errors(TRUE);
1508
- $dom = new DOMDocument;
1509
- $dom->loadXML($content);
1510
- libxml_clear_errors();
1511
- libxml_use_internal_errors($previous_value);
1512
- if(!$dom->documentElement) {
1513
- $element = $dom->createElement('span', $content);
1514
- $dom->appendChild($element);
1515
- }
1516
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1517
- $dom->documentElement->setAttribute('data-toggle', 'popover' );
1518
- if($title) { $dom->documentElement->setAttribute('data-original-title', $title ); }
1519
- $dom->documentElement->setAttribute('data-content', $text );
1520
- if($animation) { $dom->documentElement->setAttribute('data-animation', $animation ); }
1521
- if($placement) { $dom->documentElement->setAttribute('data-placement', $placement ); }
1522
- if($html) { $dom->documentElement->setAttribute('data-html', $html ); }
1523
-
1524
- $return = $dom->saveXML();
1525
-
1526
  return $return;
 
1527
  }
1528
 
1529
 
@@ -1566,23 +1549,14 @@ function bs_popover( $atts, $content = null ) {
1566
 
1567
  $class = "media-object img-responsive";
1568
  $class .= ($xclass) ? ' ' . $xclass : '';
1569
-
1570
- $previous_value = libxml_use_internal_errors(TRUE);
1571
- $dom = new DOMDocument;
1572
- $dom->loadXML($content);
1573
- libxml_clear_errors();
1574
- libxml_use_internal_errors($previous_value);
1575
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1576
- if( $data ) {
1577
- $data = explode( '|', $data );
1578
- foreach( $data as $d ):
1579
- $d = explode(',',$d);
1580
- $image->setAttribute('data-'.$d[0],trim($d[1]));
1581
- endforeach;
1582
- }
1583
- $return = $dom->saveXML();
1584
- $return = '<span class="pull-' . esc_attr($pull) . '">' . $return . '</span>';
1585
 
 
 
 
 
 
 
 
1586
  return $return;
1587
  }
1588
 
@@ -1656,37 +1630,12 @@ function bs_popover( $atts, $content = null ) {
1656
  $class = "page-header";
1657
  $class .= ($xclass) ? ' ' . $xclass : '';
1658
 
1659
- $previous_value = libxml_use_internal_errors(TRUE);
1660
- $dom = new DOMDocument;
1661
- $dom->loadXML($content);
1662
- libxml_clear_errors();
1663
- libxml_use_internal_errors($previous_value);
1664
- $hasHeader = $dom->getElementsByTagName('h1');
1665
-
1666
- if( $hasHeader->length == 0 ) {
1667
-
1668
- $wrapper = $dom->createElement('div');
1669
- $dom->appendChild($wrapper);
1670
-
1671
- $header = $dom->createElement('h1', $content);
1672
- $wrapper->appendChild($header);
1673
-
1674
- }
1675
- else {
1676
- $new_root = $dom->createElement('div');
1677
- $new_root->appendChild($dom->documentElement);
1678
- $dom->appendChild($new_root);
1679
- }
1680
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1681
- if( $data ) {
1682
- $data = explode( '|', $data );
1683
- foreach( $data as $d ):
1684
- $d = explode( ',', $d );
1685
- $dom->documentElement->setAttribute( 'data-' . $d[0], trim( $d[1] ) );
1686
- endforeach;
1687
- }
1688
- $return = $dom->saveXML();
1689
-
1690
  return $return;
1691
 
1692
  }
@@ -1762,25 +1711,12 @@ function bs_popover( $atts, $content = null ) {
1762
  $class .= ( $responsive == 'true' ) ? ' img-responsive' : '';
1763
  $class .= ( $xclass ) ? ' ' . $xclass : '';
1764
 
1765
- $previous_value = libxml_use_internal_errors(TRUE);
1766
- $dom = new DOMDocument;
1767
- $dom->loadXML( $content );
1768
- libxml_clear_errors();
1769
- libxml_use_internal_errors($previous_value);
1770
- foreach( $dom->getElementsByTagName( 'img' ) as $image ) {
1771
- $image->setAttribute( 'class', $image->getAttribute( 'class' ) . ' ' . esc_attr( $class ) );
1772
- if( $data ) {
1773
- $data = explode( '|', $data );
1774
- foreach( $data as $d ):
1775
- $d = explode( ',', $d );
1776
- $image->setAttribute( 'data-'.$d[0], trim( $d[1] ) );
1777
- endforeach;
1778
- }
1779
- }
1780
- $return = $dom->saveXML();
1781
-
1782
  return $return;
1783
-
1784
  }
1785
 
1786
  /*--------------------------------------------------------------------------------------
@@ -1791,34 +1727,25 @@ function bs_popover( $atts, $content = null ) {
1791
  *-------------------------------------------------------------------------------------*/
1792
  function bs_thumbnail( $atts, $content = null ) {
1793
  extract( shortcode_atts( array(
1794
- "xclass" => false,
1795
- "data" => false
 
1796
  ), $atts ) );
1797
 
1798
  $class = "thumbnail";
1799
  $class .= ($xclass) ? ' ' . $xclass : '';
1800
 
1801
- $previous_value = libxml_use_internal_errors(TRUE);
1802
- $dom = new DOMDocument;
1803
- $dom->loadXML( $content );
1804
- libxml_clear_errors();
1805
- libxml_use_internal_errors( $previous_value );
1806
- if( ! $dom->documentElement ) {
1807
- $element = $dom->createElement( 'div', $content );
1808
- $dom->appendChild($element);
1809
  }
1810
- $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1811
- if( $data ) {
1812
- $data = explode( '|', $data );
1813
- foreach( $data as $d ):
1814
- $d = explode( ',', $d );
1815
- $dom->documentElement->setAttribute( 'data-'.$d[0], trim( $d[1] ) );
1816
- endforeach;
1817
- }
1818
- $return = $dom->saveXML();
1819
-
1820
  return $return;
1821
-
1822
  }
1823
 
1824
  /*--------------------------------------------------------------------------------------
@@ -1964,6 +1891,11 @@ function bs_popover( $atts, $content = null ) {
1964
  );
1965
  }
1966
 
 
 
 
 
 
1967
  function parse_data_attributes( $data ) {
1968
 
1969
  $data_props = '';
@@ -1981,6 +1913,142 @@ function bs_popover( $atts, $content = null ) {
1981
  }
1982
  return $data_props;
1983
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1984
 
1985
  }
1986
 
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.2.4
7
  Author: Filip Stefansson, Simon Yeldon, and Michael W. Delaney
8
  Author URI:
9
  License: GPL2
1026
  $class .= ( $striped == 'true' ) ? ' table-striped' : '';
1027
  $class .= ( $hover == 'true' ) ? ' table-hover' : '';
1028
  $class .= ( $condensed == 'true' ) ? ' table-condensed' : '';
1029
+ $class .= ($xclass) ? ' ' . $xclass : '';
1030
 
1031
+ $return = '';
1032
+
1033
+ $tag = array('table');
1034
+ $title = '';
1035
+ $content = do_shortcode($content);
1036
+
1037
+ $return .= $this->scrape_dom_element($tag, $content, $class, $title, $data);
 
 
 
 
1038
  return $return;
1039
  }
1040
+
1041
+
1042
  /*--------------------------------------------------------------------------------------
1043
  *
1044
  * bs_well
1448
  *
1449
  *-------------------------------------------------------------------------------------*/
1450
 
1451
+
1452
  function bs_tooltip( $atts, $content = null ) {
1453
 
1454
  $defaults = array(
1455
  'title' => '',
1456
  'placement' => 'top',
1457
  'animation' => 'true',
1458
+ 'html' => 'false',
1459
+ 'data' => ''
1460
  );
1461
  extract( shortcode_atts( $defaults, $atts ) );
1462
 
1463
+ $class = 'bs-tooltip';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1464
 
1465
+ $data .= ( $animation ) ? $this->check_for_data($data) . 'animation,' . $animation : '';
1466
+ $data .= ( $placement ) ? $this->check_for_data($data) . 'placement,' . $placement : '';
1467
+ $data .= ( $html ) ? $this->check_for_data($data) . 'html,' . $html : '';
1468
+
1469
+ $return = '';
1470
+ $tag = 'span';
1471
+ $content = do_shortcode($content);
1472
+ $return .= $this->get_dom_element($tag, $content, $class, $title, $data);
1473
  return $return;
1474
+
1475
  }
1476
 
1477
  /*--------------------------------------------------------------------------------------
1488
  'text' => '',
1489
  'placement' => 'top',
1490
  'animation' => 'true',
1491
+ 'html' => 'false',
1492
+ 'data' => ''
1493
  );
1494
  extract( shortcode_atts( $defaults, $atts ) );
1495
 
1496
  $class = 'bs-popover';
1497
+
1498
+ $data .= $this->check_for_data($data) . 'toggle,popover';
1499
+ $data .= $this->check_for_data($data) . 'content,' . $text;
1500
+ $data .= ( $animation ) ? $this->check_for_data($data) . 'animation,' . $animation : '';
1501
+ $data .= ( $placement ) ? $this->check_for_data($data) . 'placement,' . $placement : '';
1502
+ $data .= ( $html ) ? $this->check_for_data($data) . 'html,' . $html : '';
1503
+
1504
+ $return = '';
1505
+ $tag = 'span';
1506
+ $content = do_shortcode($content);
1507
+ $return .= $this->get_dom_element($tag, $content, $class, $title, $data);
 
 
 
 
 
 
 
 
 
1508
  return $return;
1509
+
1510
  }
1511
 
1512
 
1549
 
1550
  $class = "media-object img-responsive";
1551
  $class .= ($xclass) ? ' ' . $xclass : '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1552
 
1553
+ $return = '';
1554
+
1555
+ $tag = array('figure', 'div', 'img', 'i', 'span');
1556
+ $title = '';
1557
+ $content = do_shortcode(preg_replace('/(<br>)+$/', '', $content));
1558
+ $return .= $this->scrape_dom_element($tag, $content, $class, $title, $data);
1559
+ $return = '<span class="pull-' . esc_attr($pull) . '">' . $return . '</span>';
1560
  return $return;
1561
  }
1562
 
1630
  $class = "page-header";
1631
  $class .= ($xclass) ? ' ' . $xclass : '';
1632
 
1633
+ $return = '';
1634
+ $title = '';
1635
+ $tag = 'div';
1636
+ $content = $this->strip_paragraph($content);
1637
+ $content = $this->nest_dom_element('h1', 'div', $content);
1638
+ $return .= $this->get_dom_element($tag, $content, $class, $title, $data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1639
  return $return;
1640
 
1641
  }
1711
  $class .= ( $responsive == 'true' ) ? ' img-responsive' : '';
1712
  $class .= ( $xclass ) ? ' ' . $xclass : '';
1713
 
1714
+ $return = '';
1715
+ $tag = array('img');
1716
+ $content = do_shortcode($content);
1717
+ $return .= $this->scrape_dom_element($tag, $content, $class, $title, $data);
 
 
 
 
 
 
 
 
 
 
 
 
 
1718
  return $return;
1719
+
1720
  }
1721
 
1722
  /*--------------------------------------------------------------------------------------
1727
  *-------------------------------------------------------------------------------------*/
1728
  function bs_thumbnail( $atts, $content = null ) {
1729
  extract( shortcode_atts( array(
1730
+ "xclass" => false,
1731
+ "has_content" => false,
1732
+ "data" => false
1733
  ), $atts ) );
1734
 
1735
  $class = "thumbnail";
1736
  $class .= ($xclass) ? ' ' . $xclass : '';
1737
 
1738
+ $return = '';
1739
+ if($has_content) {
1740
+ $content = '<div>' . $content . '</div>';
1741
+ $tag = array('div');
1742
+ } else {
1743
+ $tag = array('a', 'img');
 
 
1744
  }
1745
+ $content = do_shortcode($content);
1746
+ $return .= $this->scrape_dom_element($tag, $content, $class, $title, $data);
 
 
 
 
 
 
 
 
1747
  return $return;
1748
+
1749
  }
1750
 
1751
  /*--------------------------------------------------------------------------------------
1891
  );
1892
  }
1893
 
1894
+ /*--------------------------------------------------------------------------------------
1895
+ *
1896
+ * Parse data-attributes for shortcodes
1897
+ *
1898
+ *-------------------------------------------------------------------------------------*/
1899
  function parse_data_attributes( $data ) {
1900
 
1901
  $data_props = '';
1913
  }
1914
  return $data_props;
1915
  }
1916
+
1917
+ /*--------------------------------------------------------------------------------------
1918
+ *
1919
+ * get DOMDocument element and apply shortcode parameters to it. Create the element if it doesn't exist
1920
+ *
1921
+ *-------------------------------------------------------------------------------------*/
1922
+ function get_dom_element( $tag, $content, $class, $title, $data = null ) {
1923
+
1924
+ //clean up content
1925
+ $content = trim(trim($content), chr(0xC2).chr(0xA0));
1926
+ $previous_value = libxml_use_internal_errors(TRUE);
1927
+
1928
+ $dom = new DOMDocument;
1929
+ $dom->loadXML($content);
1930
+
1931
+ libxml_clear_errors();
1932
+ libxml_use_internal_errors($previous_value);
1933
+
1934
+ if(!$dom->documentElement) {
1935
+ $element = $dom->createElement($tag, $content);
1936
+ $dom->appendChild($element);
1937
+ }
1938
+
1939
+ $dom->documentElement->setAttribute('class', $dom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1940
+ if( $title ) {
1941
+ $dom->documentElement->setAttribute('title', $title );
1942
+ }
1943
+ if( $data ) {
1944
+ $data = explode( '|', $data );
1945
+ foreach( $data as $d ):
1946
+ $d = explode(',',$d);
1947
+ $dom->documentElement->setAttribute('data-'.$d[0],trim($d[1]));
1948
+ endforeach;
1949
+ }
1950
+ return $dom->saveXML($dom->documentElement);
1951
+ }
1952
+
1953
+ /*--------------------------------------------------------------------------------------
1954
+ *
1955
+ * Scrape the shortcode's contents for a particular DOMDocument tag or tags, pull them out, apply attributes, and return just the tags.
1956
+ *
1957
+ *-------------------------------------------------------------------------------------*/
1958
+ function scrape_dom_element( $tag, $content, $class, $title, $data = null ) {
1959
+
1960
+ $previous_value = libxml_use_internal_errors(TRUE);
1961
+
1962
+ $dom = new DOMDocument;
1963
+ $dom->loadHTML($content);
1964
+
1965
+ libxml_clear_errors();
1966
+ libxml_use_internal_errors($previous_value);
1967
+ foreach ($tag as $find) {
1968
+ $tags = $dom->getElementsByTagName($find);
1969
+ foreach ($tags as $find_tag) {
1970
+ $outputdom = new DOMDocument;
1971
+ $new_root = $outputdom->importNode($find_tag, true);
1972
+ $outputdom->appendChild($new_root);
1973
+
1974
+ if(is_object($outputdom->documentElement)) {
1975
+ $outputdom->documentElement->setAttribute('class', $outputdom->documentElement->getAttribute('class') . ' ' . esc_attr( $class ));
1976
+ if( $title ) {
1977
+ $outputdom->documentElement->setAttribute('title', $title );
1978
+ }
1979
+ if( $data ) {
1980
+ $data = explode( '|', $data );
1981
+ foreach( $data as $d ):
1982
+ $d = explode(',',$d);
1983
+ $outputdom->documentElement->setAttribute('data-'.$d[0],trim($d[1]));
1984
+ endforeach;
1985
+ }
1986
+ }
1987
+ return $outputdom->saveHTML($outputdom->documentElement);
1988
+
1989
+ }
1990
+ }
1991
+ }
1992
+
1993
+ /*--------------------------------------------------------------------------------------
1994
+ *
1995
+ * Find if content contains a particular tag, if not, create it, either way wrap it in a wrapper tag
1996
+ *
1997
+ * Example: Check if the contents of [page-header] include an h1, if not, add one, then wrap it all in a div so we can add classes to that.
1998
+ *
1999
+ *-------------------------------------------------------------------------------------*/
2000
+ function nest_dom_element($find, $append, $content) {
2001
+
2002
+ $previous_value = libxml_use_internal_errors(TRUE);
2003
+
2004
+ $dom = new DOMDocument;
2005
+ $dom->loadXML($content);
2006
+
2007
+ libxml_clear_errors();
2008
+ libxml_use_internal_errors($previous_value);
2009
+
2010
+ //Does $content include the tag we're looking for?
2011
+ $hasFind = $dom->getElementsByTagName($find);
2012
+
2013
+ //If not, add it and wrap it all in our append tag
2014
+ if( $hasFind->length == 0 ) {
2015
+ $wrapper = $dom->createElement($append);
2016
+ $dom->appendChild($wrapper);
2017
+
2018
+ $tag = $dom->createElement($find, $content);
2019
+ $wrapper->appendChild($tag);
2020
+ }
2021
+
2022
+ //If so, just wrap everything in our append tag
2023
+ else {
2024
+ $new_root = $dom->createElement($append);
2025
+ $new_root->appendChild($dom->documentElement);
2026
+ $dom->appendChild($new_root);
2027
+ }
2028
+ return $dom->saveXML($dom->documentElement);
2029
+ }
2030
+
2031
+ /*--------------------------------------------------------------------------------------
2032
+ *
2033
+ * Add dividers to data attributes content if needed
2034
+ *
2035
+ *-------------------------------------------------------------------------------------*/
2036
+ function check_for_data( $data ) {
2037
+ if( $data ) {
2038
+ return "|";
2039
+ }
2040
+ }
2041
+
2042
+ /*--------------------------------------------------------------------------------------
2043
+ *
2044
+ * If the user puts a return between the shortcode and its contents, sometimes we want to strip the resulting P tags out
2045
+ *
2046
+ *-------------------------------------------------------------------------------------*/
2047
+ function strip_paragraph( $content ) {
2048
+ $content = str_ireplace( '<p>','',$content );
2049
+ $content = str_ireplace( '</p>','',$content );
2050
+ return $content;
2051
+ }
2052
 
2053
  }
2054
 
composer.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "filipstefansson/bootstrap-3-shortcodes",
3
- "version": "3.0.3.5",
4
  "description": "WordPress shortcodes for easier use of Bootstrap elements in your content.",
5
  "keywords": [
6
  "bootstrap",
1
  {
2
  "name": "filipstefansson/bootstrap-3-shortcodes",
3
+ "version": "3.2.3",
4
  "description": "WordPress shortcodes for easier use of Bootstrap elements in your content.",
5
  "keywords": [
6
  "bootstrap",
includes/actions-filters.php CHANGED
@@ -37,7 +37,7 @@ function add_bootstrap_button() {
37
 
38
  //append the icon
39
  printf(
40
- '<a data-toggle="modal" data-target="#bootstrap-shortcodes-help" title="%2$s" href="%3$s" class="%4$s" style="padding-left: 0px; padding-right: 0px;"><span class="bs_bootstrap-logo wp-media-buttons-icon"></span></a>',
41
  esc_attr( $popup_id ),
42
  esc_attr( $title ),
43
  esc_url( '#' ),
@@ -56,3 +56,26 @@ function boostrap_shortcodes_help() {
56
  include('bootstrap-shortcodes-help.php');
57
  }
58
  add_action( 'admin_footer', 'boostrap_shortcodes_help' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  //append the icon
39
  printf(
40
+ '<a data-toggle="modal" data-target="#bootstrap-shortcodes-help" title="%2$s" href="%3$s" class="%4$s"><span class="bs_bootstrap-logo wp-media-buttons-icon"></span></a>',
41
  esc_attr( $popup_id ),
42
  esc_attr( $title ),
43
  esc_url( '#' ),
56
  include('bootstrap-shortcodes-help.php');
57
  }
58
  add_action( 'admin_footer', 'boostrap_shortcodes_help' );
59
+
60
+ // Add the Bootstrap Shortcodes button to Distraction Free Writing mode
61
+ function bs_fullscreenbuttons($buttons) {
62
+
63
+ $buttons[] = 'separator';
64
+
65
+ $buttons['bootstrap-shortcodes'] = array(
66
+ 'title' => __('Boostrap 3 Shortcodes Help'),
67
+ 'onclick' => "jQuery('#bootstrap-shortcodes-help').modal('show');",
68
+ 'both' => false
69
+ );
70
+
71
+ return $buttons;
72
+ }
73
+ add_action ('wp_fullscreen_buttons', 'bs_fullscreenbuttons');
74
+
75
+ add_filter("gform_noconflict_styles", "bs_register_script");
76
+ function bs_register_script($scripts){
77
+
78
+ //registering my script with Gravity Forms so that it gets enqueued when running on no-conflict mode
79
+ $scripts[] = "bootstrap-shortcodes-help-all";
80
+ return $scripts;
81
+ }
includes/functions.php CHANGED
@@ -4,13 +4,19 @@ function bs_fix_shortcodes($content){
4
  $array = array (
5
  '<p>[' => '[',
6
  ']</p>' => ']',
7
- ']<br />' => ']'
 
8
  );
9
 
10
  $content = strtr($content, $array);
11
  return $content;
12
  }
13
 
 
 
 
 
 
14
  // We need to be able to figure out the attributes of a wrapped shortcode
15
  function bs_attribute_map($str, $att = null) {
16
  $res = array();
4
  $array = array (
5
  '<p>[' => '[',
6
  ']</p>' => ']',
7
+ ']<br />' => ']',
8
+ ']<br>' => ']'
9
  );
10
 
11
  $content = strtr($content, $array);
12
  return $content;
13
  }
14
 
15
+ function bs_cleanup_domdocument($content) {
16
+ $content = preg_replace('#(( ){0,}<br( {0,})(/{0,1})>){1,}$#i', '', $content);
17
+ return $content;
18
+ }
19
+
20
  // We need to be able to figure out the attributes of a wrapped shortcode
21
  function bs_attribute_map($str, $att = null) {
22
  $res = array();
includes/help/README.html CHANGED
@@ -49,20 +49,20 @@
49
  <h3 id="grid">Grid</h3>
50
  <pre><code> [row]
51
  [column md=&quot;6&quot;]
52
-
53
  [/column]
54
  [column md=&quot;6&quot;]
55
-
56
  [/column]
57
  [/row]</code></pre>
58
  <p>The container component is also supported in case your theme doesn&#39;t incude a container.</p>
59
  <pre><code>[container]
60
  [row]
61
  [column md=&quot;6&quot;]
62
-
63
  [/column]
64
  [column md=&quot;6&quot;]
65
-
66
  [/column]
67
  [/row]
68
  [/container]</code></pre>
@@ -272,7 +272,7 @@
272
  <p><a href="http://getbootstrap.com/css/#grid">Bootstrap grid documentation</a>.</p>
273
  <hr>
274
  <h3 id="lead-body-copy">Lead body copy</h3>
275
- <pre><code>[lead] [/lead]</code></pre>
276
  <h4 id="-lead-parameters">[lead] parameters</h4>
277
  <table>
278
  <thead>
@@ -304,7 +304,7 @@
304
  <p><a href="http://getbootstrap.com/css/#type-body-copy">Bootstrap body copy documentation</a></p>
305
  <hr>
306
  <h3 id="emphasis-classes">Emphasis classes</h3>
307
- <pre><code>[emphasis type=&quot;success&quot;] [/emphasis]</code></pre>
308
  <h4 id="-emphasis-parameters">[emphasis] parameters</h4>
309
  <table>
310
  <thead>
@@ -343,7 +343,7 @@
343
  <p><a href="http://getbootstrap.com/css/#type-emphasis">Bootstrap emphasis classes documentation</a></p>
344
  <hr>
345
  <h3 id="code">Code</h3>
346
- <pre><code>[code] [/code]</code></pre>
347
  <h4 id="-code-parameters">[code] parameters</h4>
348
  <table>
349
  <thead>
@@ -453,7 +453,7 @@
453
  <p><a href="http://getbootstrap.com/css/#tables">Bootstrap table documentation</a></p>
454
  <hr>
455
  <h3 id="buttons">Buttons</h3>
456
- <pre><code>[button type=&quot;success&quot; size=&quot;lg&quot; link=&quot;#&quot;] [/button]</code></pre>
457
  <h4 id="-button-parameters">[button] parameters</h4>
458
  <table>
459
  <thead>
@@ -541,7 +541,7 @@
541
  <p><a href="http://getbootstrap.com/css/#buttons">Bootstrap button documentation</a></p>
542
  <hr>
543
  <h3 id="images">Images</h3>
544
- <pre><code>[img type=&quot;circle&quot; responsive=&quot;true&quot;] [/img]</code></pre>
545
  <p>Wrap any number of HTML image tags or images inserted via the WordPress media manager.</p>
546
  <h4 id="-img-parameters">[img] parameters</h4>
547
  <table>
@@ -588,7 +588,7 @@
588
  <p><a href="http://getbootstrap.com/css/#images">Bootstrap images documentation</a></p>
589
  <hr>
590
  <h3 id="responsive-utilities">Responsive Utilities</h3>
591
- <pre><code>[responsive visible_block=&quot;lg md&quot; hidden=&quot;sn xs&quot;] [/responsive]</code></pre>
592
  <h4 id="-reponsive-parameters">[reponsive] parameters</h4>
593
  <table>
594
  <thead>
@@ -697,24 +697,24 @@
697
  <h3 id="button-groups">Button Groups</h3>
698
  <h4 id="basic-example">Basic example</h4>
699
  <pre><code>[button-group size=&quot;lg&quot; justified=&quot;&quot; vertical=&quot;&quot;]
700
- [button link=&quot;#&quot;] [/button]
701
- [button link=&quot;#&quot;] [/button]
702
- [button link=&quot;#&quot;] [/button]
703
  [/button-group]</code></pre>
704
  <h4 id="button-toolbar">Button toolbar</h4>
705
  <pre><code>[button-toolbar]
706
  [button-group]
707
- [button link=&quot;#&quot;] [/button]
708
- [button link=&quot;#&quot;] [/button]
709
- [button link=&quot;#&quot;] [/button]
710
  [/button-group]
711
  [button-group]
712
- [button link=&quot;#&quot;] [/button]
713
- [button link=&quot;#&quot;] [/button]
714
- [button link=&quot;#&quot;] [/button]
715
  [/button-group]
716
  [button-group]
717
- [button link=&quot;#&quot;] [/button]
718
  [/button-group]
719
  [/button-toolbar]</code></pre>
720
  <h4 id="-button-group-parameters">[button-group] parameters</h4>
@@ -807,34 +807,34 @@
807
  <p>Button Dropdowns can be accomplished by combining the [button-group] shortcode, the &quot;data&quot; parameters of the [button] shortcode, and [dropdown] shortcode as follows.</p>
808
  <h4 id="single-button-dropdowns">Single button dropdowns</h4>
809
  <pre><code>[button-group]
810
- [button link=&quot;#&quot; dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;] [caret][/button]
811
  [dropdown]
812
- [dropdown-header] [/dropdown-header]
813
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
814
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
815
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
816
  [divider]
817
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
818
  [/dropdown]
819
  [/button-group]</code></pre>
820
  <h4 id="split-button-dropdowns">Split button dropdowns</h4>
821
  <pre><code>[button-group]
822
- [button link=&quot;#&quot;] [/button]
823
  [button dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;][caret][/button]
824
  [dropdown]
825
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
826
  [divider]
827
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
828
  [/dropdown]
829
  [/button-group]</code></pre>
830
  <h4 id="dropup-variation">Dropup variation</h4>
831
  <pre><code>[button-group dropup=&quot;true&quot;]
832
- [button link=&quot;#&quot;] [/button]
833
  [button dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;][caret][/button]
834
  [dropdown]
835
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
836
  [divider]
837
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
838
  [/dropdown]
839
  [/button-group] </code></pre>
840
  <h4 id="-dropdown-parameters">[dropdown] parameters</h4>
@@ -995,17 +995,17 @@
995
  <hr>
996
  <h3 id="navs">Navs</h3>
997
  <pre><code>[nav type=&quot;pills&quot;]
998
- [nav-item link=&quot;#&quot;] [/nav-item]
999
- [nav-item link=&quot;#&quot;] [/nav-item]
1000
- [nav-item link=&quot;#&quot;] [/nav-item]
1001
  [/nav]</code></pre>
1002
  <h4 id="nav-with-dropdowns">Nav with dropdowns</h4>
1003
  <pre><code>[nav type=&quot;pills&quot;]
1004
- [nav-item link=&quot;#&quot; active=&quot;true&quot;] [/nav-item]
1005
- [nav-item dropdown=&quot;true&quot; link=&quot;#&quot;] [caret]
1006
  [dropdown]
1007
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
1008
- [dropdown-item link=&quot;#&quot;] [/dropdown-item]
1009
  [/dropdown]
1010
  [/nav-item]
1011
  [/nav]</code></pre>
@@ -1111,9 +1111,9 @@
1111
  <hr>
1112
  <h3 id="breadcrumbs">Breadcrumbs</h3>
1113
  <pre><code>[breadcrumb]
1114
- [breadcrumb-item link=&quot;#&quot;] [/breadcrumb-item]
1115
- [breadcrumb-item link=&quot;#&quot;] [/breadcrumb-item]
1116
- [breadcrumb-item link=&quot;#&quot;] [/breadcrumb-item]
1117
  [/breadcrumb]</code></pre>
1118
  <h4 id="-breadcrumb-parameters">[breadcrumb] parameters</h4>
1119
  <table>
@@ -1181,7 +1181,7 @@
1181
  <p><a href="http://getbootstrap.com/components/#breadcrumbs">Bootstrap breadcrumbs documentation</a></p>
1182
  <hr>
1183
  <h3 id="labels">Labels</h3>
1184
- <pre><code>[label type=&quot;success&quot;] [/label]</code></pre>
1185
  <h4 id="-label-parameters">[label] parameters</h4>
1186
  <table>
1187
  <thead>
@@ -1220,7 +1220,7 @@
1220
  <p><a href="http://getbootstrap.com/components/#labels">Bootstrap label documentation</a></p>
1221
  <hr>
1222
  <h3 id="badges">Badges</h3>
1223
- <pre><code>[badge right=&quot;true&quot;] [/badge]</code></pre>
1224
  <h4 id="-badge-parameters">[badge] parameters</h4>
1225
  <table>
1226
  <thead>
@@ -1259,7 +1259,7 @@
1259
  <p><a href="http://getbootstrap.com/components/#badges">Bootstrap badges documentation</a></p>
1260
  <hr>
1261
  <h3 id="jumbotron">Jumbotron</h3>
1262
- <pre><code>[jumbotron title=&quot;My Jumbotron&quot;] [/jumbotron]</code></pre>
1263
  <h4 id="-jumbotron-parameters">[jumbotron] parameters</h4>
1264
  <table>
1265
  <thead>
@@ -1298,7 +1298,7 @@
1298
  <p><a href="http://getbootstrap.com/components/#jumbotron">Bootstrap jumbotron documentation</a></p>
1299
  <hr>
1300
  <h3 id="page-header">Page Header</h3>
1301
- <pre><code>[page-header] [/page-header]</code></pre>
1302
  <p>Automatically inserts H1 tag if not present</p>
1303
  <h4 id="-page-header-parameters">[page-header] parameters</h4>
1304
  <table>
@@ -1331,9 +1331,9 @@
1331
  <p><a href="http://getbootstrap.com/components/#page-header">Bootstrap page-header documentation</a></p>
1332
  <hr>
1333
  <h3 id="thumbnails">Thumbnails</h3>
1334
- <pre><code>[thumbnail] [/thumbnail]
1335
- [thumbnail] [/thumbnail]
1336
- [thumbnail] [/thumbnail]</code></pre>
1337
  <h4 id="-thumbnail-parameters">[thumbnail] parameters</h4>
1338
  <table>
1339
  <thead>
@@ -1347,6 +1347,13 @@
1347
  </thead>
1348
  <tbody>
1349
  <tr>
 
 
 
 
 
 
 
1350
  <td>xclass</td>
1351
  <td>Any extra classes you want to add</td>
1352
  <td>optional</td>
@@ -1365,7 +1372,7 @@
1365
  <p><a href="http://getbootstrap.com/components/#thumbnails">Bootstrap thumbnails documentation</a></p>
1366
  <hr>
1367
  <h3 id="alerts">Alerts</h3>
1368
- <pre><code>[alert type=&quot;success&quot;] [/alert]</code></pre>
1369
  <h4 id="-alert-parameters">[alert] parameters</h4>
1370
  <table>
1371
  <thead>
@@ -1511,10 +1518,10 @@
1511
  <h3 id="media-objects">Media Objects</h3>
1512
  <pre><code>[media]
1513
  [media-object pull=&quot;right&quot;]
1514
-
1515
  [/media-object]
1516
  [media-body title=&quot;Testing&quot;]
1517
-
1518
  [/media-body]
1519
  [/media]</code></pre>
1520
  <h4 id="-media-parameters">[media] parameters</h4>
@@ -1622,40 +1629,40 @@
1622
  <h4 id="basic-example">Basic Example</h4>
1623
  <pre><code>[list-group]
1624
  [list-group-item]
1625
-
1626
  [/list-group-item]
1627
  [list-group-item]
1628
-
1629
  [/list-group-item]
1630
  [list-group-item]
1631
-
1632
  [/list-group-item]
1633
  [/list-group]</code></pre>
1634
  <h4 id="linked-items">Linked Items</h4>
1635
  <pre><code>[list-group linked=&quot;true&quot;]
1636
  [list-group-item link=&quot;#&quot; active=&quot;true&quot;]
1637
-
1638
  [/list-group-item]
1639
  [list-group-item link=&quot;#&quot;]
1640
-
1641
  [/list-group-item]
1642
  [list-group-item link=&quot;#&quot;]
1643
-
1644
  [/list-group-item]
1645
  [/list-group]</code></pre>
1646
  <h4 id="custom-content">Custom Content</h4>
1647
  <pre><code>[list-group linked=&quot;true&quot;]
1648
  [list-group-item link=&quot;#&quot; active=&quot;true&quot;]
1649
- [list-group-item-heading][/list-group-item-heading]
1650
- [list-group-item-text][/list-group-item-text]
1651
  [/list-group-item]
1652
  [list-group-item link=&quot;#&quot;]
1653
- [list-group-item-heading][/list-group-item-heading]
1654
- [list-group-item-text][/list-group-item-text]
1655
  [/list-group-item]
1656
  [list-group-item link=&quot;#&quot;]
1657
- [list-group-item-heading][/list-group-item-heading]
1658
- [list-group-item-text][/list-group-item-text]
1659
  [/list-group-item]
1660
  [/list-group]</code></pre>
1661
  <h4 id="-list-group-parameters">[list-group] parameters</h4>
@@ -1808,7 +1815,7 @@
1808
  <p><a href="http://getbootstrap.com/components/#list-group">Bootstrap list groups documentation</a></p>
1809
  <hr>
1810
  <h3 id="panels">Panels</h3>
1811
- <pre><code>[panel type=&quot;info&quot; heading=&quot;Panel Title&quot; footer=&quot;Footer text&quot;] [/panel]</code></pre>
1812
  <h4 id="-panel-parameters">[panel] parameters</h4>
1813
  <table>
1814
  <thead>
@@ -1868,7 +1875,7 @@
1868
  <p><a href="http://getbootstrap.com/components/#panels">Bootstrap panels documentation</a></p>
1869
  <hr>
1870
  <h3 id="wells">Wells</h3>
1871
- <pre><code>[well size=&quot;sm&quot;] [/well]</code></pre>
1872
  <h4 id="-well-parameters">[well] parameters</h4>
1873
  <table>
1874
  <thead>
@@ -1910,13 +1917,13 @@
1910
  <h3 id="tabs">Tabs</h3>
1911
  <pre><code>[tabs type=&quot;tabs&quot;]
1912
  [tab title=&quot;Home&quot; active=&quot;true&quot;]
1913
-
1914
  [/tab]
1915
  [tab title=&quot;Profile&quot;]
1916
-
1917
  [/tab]
1918
  [tab title=&quot;Messages&quot;]
1919
-
1920
  [/tab]
1921
  [/tabs]</code></pre>
1922
  <h4 id="-tabs-parameters">[tabs] parameters</h4>
@@ -2006,7 +2013,7 @@
2006
  <p><a href="http://getbootstrap.com/javascript/#tabs">Bootstrap tabs documentation</a></p>
2007
  <hr>
2008
  <h3 id="tooltip">Tooltip</h3>
2009
- <pre><code>[tooltip title=&quot;I&#39;m the title&quot; placement=&quot;right&quot;] [/tooltip]</code></pre>
2010
  <h4 id="-tooltip-parameters">[tooltip] parameters</h4>
2011
  <table>
2012
  <thead>
@@ -2052,7 +2059,7 @@
2052
  <p><a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap tooltip documentation</a></p>
2053
  <hr>
2054
  <h3 id="popover">Popover</h3>
2055
- <pre><code>[popover title=&quot;I&#39;m the title&quot; content=&quot;And here&#39;s some amazing content. It&#39;s very engaging. right?&quot; placement=&quot;right&quot;] [/popover]</code></pre>
2056
  <h4 id="-popover-parameters">[popover] parameters</h4>
2057
  <table>
2058
  <thead>
@@ -2107,13 +2114,13 @@
2107
  <h3 id="collapse">Collapse</h3>
2108
  <pre><code>[collapsibles]
2109
  [collapse title=&quot;Collapse 1&quot; active=&quot;true&quot;]
2110
-
2111
  [/collapse]
2112
  [collapse title=&quot;Collapse 2&quot;]
2113
-
2114
  [/collapse]
2115
  [collapse title=&quot;Collapse 3&quot;]
2116
-
2117
  [/collapse]
2118
  [/collapsibles]</code></pre>
2119
  <h4 id="-collapsibles-parameters">[collapsibles] parameters</h4>
@@ -2197,9 +2204,9 @@
2197
  <hr>
2198
  <h3 id="carousel">Carousel</h3>
2199
  <pre><code>[carousel]
2200
- [carousel-item active=&quot;true&quot;] [/carousel-item]
2201
- [carousel-item] [/carousel-item]
2202
- [carousel-item] [/carousel-item]
2203
  [/carousel]</code></pre>
2204
  <p>[carousel-item] wraps an HTML image tag or image inserted via the WordPress editor.</p>
2205
  <h4 id="-carousel-parameters">[carousel] parameters</h4>
@@ -2290,7 +2297,7 @@
2290
  <hr>
2291
  <h3 id="modal">Modal</h3>
2292
  <pre><code>[modal text=&quot;This is my modal&quot; title=&quot;Modal Title Goes Here&quot; xclass=&quot;btn btn-primary btn-large&quot;]
2293
-
2294
  [modal-footer]
2295
  [button type=&quot;primary&quot; link=&quot;#&quot; data=&quot;dismiss,modal&quot;]Dismiss[/button]
2296
  [/modal-footer]
49
  <h3 id="grid">Grid</h3>
50
  <pre><code> [row]
51
  [column md=&quot;6&quot;]
52
+ ...
53
  [/column]
54
  [column md=&quot;6&quot;]
55
+ ...
56
  [/column]
57
  [/row]</code></pre>
58
  <p>The container component is also supported in case your theme doesn&#39;t incude a container.</p>
59
  <pre><code>[container]
60
  [row]
61
  [column md=&quot;6&quot;]
62
+ ...
63
  [/column]
64
  [column md=&quot;6&quot;]
65
+ ...
66
  [/column]
67
  [/row]
68
  [/container]</code></pre>
272
  <p><a href="http://getbootstrap.com/css/#grid">Bootstrap grid documentation</a>.</p>
273
  <hr>
274
  <h3 id="lead-body-copy">Lead body copy</h3>
275
+ <pre><code>[lead] ... [/lead]</code></pre>
276
  <h4 id="-lead-parameters">[lead] parameters</h4>
277
  <table>
278
  <thead>
304
  <p><a href="http://getbootstrap.com/css/#type-body-copy">Bootstrap body copy documentation</a></p>
305
  <hr>
306
  <h3 id="emphasis-classes">Emphasis classes</h3>
307
+ <pre><code>[emphasis type=&quot;success&quot;] ... [/emphasis]</code></pre>
308
  <h4 id="-emphasis-parameters">[emphasis] parameters</h4>
309
  <table>
310
  <thead>
343
  <p><a href="http://getbootstrap.com/css/#type-emphasis">Bootstrap emphasis classes documentation</a></p>
344
  <hr>
345
  <h3 id="code">Code</h3>
346
+ <pre><code>[code] ... [/code]</code></pre>
347
  <h4 id="-code-parameters">[code] parameters</h4>
348
  <table>
349
  <thead>
453
  <p><a href="http://getbootstrap.com/css/#tables">Bootstrap table documentation</a></p>
454
  <hr>
455
  <h3 id="buttons">Buttons</h3>
456
+ <pre><code>[button type=&quot;success&quot; size=&quot;lg&quot; link=&quot;#&quot;] ... [/button]</code></pre>
457
  <h4 id="-button-parameters">[button] parameters</h4>
458
  <table>
459
  <thead>
541
  <p><a href="http://getbootstrap.com/css/#buttons">Bootstrap button documentation</a></p>
542
  <hr>
543
  <h3 id="images">Images</h3>
544
+ <pre><code>[img type=&quot;circle&quot; responsive=&quot;true&quot;] ... [/img]</code></pre>
545
  <p>Wrap any number of HTML image tags or images inserted via the WordPress media manager.</p>
546
  <h4 id="-img-parameters">[img] parameters</h4>
547
  <table>
588
  <p><a href="http://getbootstrap.com/css/#images">Bootstrap images documentation</a></p>
589
  <hr>
590
  <h3 id="responsive-utilities">Responsive Utilities</h3>
591
+ <pre><code>[responsive visible_block=&quot;lg md&quot; hidden=&quot;sn xs&quot;] ... [/responsive]</code></pre>
592
  <h4 id="-reponsive-parameters">[reponsive] parameters</h4>
593
  <table>
594
  <thead>
697
  <h3 id="button-groups">Button Groups</h3>
698
  <h4 id="basic-example">Basic example</h4>
699
  <pre><code>[button-group size=&quot;lg&quot; justified=&quot;&quot; vertical=&quot;&quot;]
700
+ [button link=&quot;#&quot;] ... [/button]
701
+ [button link=&quot;#&quot;] ... [/button]
702
+ [button link=&quot;#&quot;] ... [/button]
703
  [/button-group]</code></pre>
704
  <h4 id="button-toolbar">Button toolbar</h4>
705
  <pre><code>[button-toolbar]
706
  [button-group]
707
+ [button link=&quot;#&quot;] ... [/button]
708
+ [button link=&quot;#&quot;] ... [/button]
709
+ [button link=&quot;#&quot;] ... [/button]
710
  [/button-group]
711
  [button-group]
712
+ [button link=&quot;#&quot;] ... [/button]
713
+ [button link=&quot;#&quot;] ... [/button]
714
+ [button link=&quot;#&quot;] ... [/button]
715
  [/button-group]
716
  [button-group]
717
+ [button link=&quot;#&quot;] ... [/button]
718
  [/button-group]
719
  [/button-toolbar]</code></pre>
720
  <h4 id="-button-group-parameters">[button-group] parameters</h4>
807
  <p>Button Dropdowns can be accomplished by combining the [button-group] shortcode, the &quot;data&quot; parameters of the [button] shortcode, and [dropdown] shortcode as follows.</p>
808
  <h4 id="single-button-dropdowns">Single button dropdowns</h4>
809
  <pre><code>[button-group]
810
+ [button link=&quot;#&quot; dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;] ... [caret][/button]
811
  [dropdown]
812
+ [dropdown-header] ... [/dropdown-header]
813
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
814
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
815
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
816
  [divider]
817
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
818
  [/dropdown]
819
  [/button-group]</code></pre>
820
  <h4 id="split-button-dropdowns">Split button dropdowns</h4>
821
  <pre><code>[button-group]
822
+ [button link=&quot;#&quot;] ... [/button]
823
  [button dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;][caret][/button]
824
  [dropdown]
825
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
826
  [divider]
827
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
828
  [/dropdown]
829
  [/button-group]</code></pre>
830
  <h4 id="dropup-variation">Dropup variation</h4>
831
  <pre><code>[button-group dropup=&quot;true&quot;]
832
+ [button link=&quot;#&quot;] ... [/button]
833
  [button dropdown=&quot;true&quot; data=&quot;toggle,dropdown&quot;][caret][/button]
834
  [dropdown]
835
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
836
  [divider]
837
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
838
  [/dropdown]
839
  [/button-group] </code></pre>
840
  <h4 id="-dropdown-parameters">[dropdown] parameters</h4>
995
  <hr>
996
  <h3 id="navs">Navs</h3>
997
  <pre><code>[nav type=&quot;pills&quot;]
998
+ [nav-item link=&quot;#&quot;] ... [/nav-item]
999
+ [nav-item link=&quot;#&quot;] ... [/nav-item]
1000
+ [nav-item link=&quot;#&quot;] ... [/nav-item]
1001
  [/nav]</code></pre>
1002
  <h4 id="nav-with-dropdowns">Nav with dropdowns</h4>
1003
  <pre><code>[nav type=&quot;pills&quot;]
1004
+ [nav-item link=&quot;#&quot; active=&quot;true&quot;] ... [/nav-item]
1005
+ [nav-item dropdown=&quot;true&quot; link=&quot;#&quot;] ... [caret]
1006
  [dropdown]
1007
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
1008
+ [dropdown-item link=&quot;#&quot;] ... [/dropdown-item]
1009
  [/dropdown]
1010
  [/nav-item]
1011
  [/nav]</code></pre>
1111
  <hr>
1112
  <h3 id="breadcrumbs">Breadcrumbs</h3>
1113
  <pre><code>[breadcrumb]
1114
+ [breadcrumb-item link=&quot;#&quot;] ... [/breadcrumb-item]
1115
+ [breadcrumb-item link=&quot;#&quot;] ... [/breadcrumb-item]
1116
+ [breadcrumb-item link=&quot;#&quot;] ... [/breadcrumb-item]
1117
  [/breadcrumb]</code></pre>
1118
  <h4 id="-breadcrumb-parameters">[breadcrumb] parameters</h4>
1119
  <table>
1181
  <p><a href="http://getbootstrap.com/components/#breadcrumbs">Bootstrap breadcrumbs documentation</a></p>
1182
  <hr>
1183
  <h3 id="labels">Labels</h3>
1184
+ <pre><code>[label type=&quot;success&quot;] ... [/label]</code></pre>
1185
  <h4 id="-label-parameters">[label] parameters</h4>
1186
  <table>
1187
  <thead>
1220
  <p><a href="http://getbootstrap.com/components/#labels">Bootstrap label documentation</a></p>
1221
  <hr>
1222
  <h3 id="badges">Badges</h3>
1223
+ <pre><code>[badge right=&quot;true&quot;] ... [/badge]</code></pre>
1224
  <h4 id="-badge-parameters">[badge] parameters</h4>
1225
  <table>
1226
  <thead>
1259
  <p><a href="http://getbootstrap.com/components/#badges">Bootstrap badges documentation</a></p>
1260
  <hr>
1261
  <h3 id="jumbotron">Jumbotron</h3>
1262
+ <pre><code>[jumbotron title=&quot;My Jumbotron&quot;] ... [/jumbotron]</code></pre>
1263
  <h4 id="-jumbotron-parameters">[jumbotron] parameters</h4>
1264
  <table>
1265
  <thead>
1298
  <p><a href="http://getbootstrap.com/components/#jumbotron">Bootstrap jumbotron documentation</a></p>
1299
  <hr>
1300
  <h3 id="page-header">Page Header</h3>
1301
+ <pre><code>[page-header] ... [/page-header]</code></pre>
1302
  <p>Automatically inserts H1 tag if not present</p>
1303
  <h4 id="-page-header-parameters">[page-header] parameters</h4>
1304
  <table>
1331
  <p><a href="http://getbootstrap.com/components/#page-header">Bootstrap page-header documentation</a></p>
1332
  <hr>
1333
  <h3 id="thumbnails">Thumbnails</h3>
1334
+ <pre><code>[thumbnail] ... [/thumbnail]
1335
+ [thumbnail] ... [/thumbnail]
1336
+ [thumbnail] ... [/thumbnail]</code></pre>
1337
  <h4 id="-thumbnail-parameters">[thumbnail] parameters</h4>
1338
  <table>
1339
  <thead>
1347
  </thead>
1348
  <tbody>
1349
  <tr>
1350
+ <td>has_content</td>
1351
+ <td>Set to &quot;true&quot; if this thumbnail contains more than just an image or linked image as in <a href="http://getbootstrap.com/components/#thumbnails-custom-content">Bootstrap&#39;s thumbnail documentation</a>.</td>
1352
+ <td>optional</td>
1353
+ <td>true, false</td>
1354
+ <td>false</td>
1355
+ </tr>
1356
+ <tr>
1357
  <td>xclass</td>
1358
  <td>Any extra classes you want to add</td>
1359
  <td>optional</td>
1372
  <p><a href="http://getbootstrap.com/components/#thumbnails">Bootstrap thumbnails documentation</a></p>
1373
  <hr>
1374
  <h3 id="alerts">Alerts</h3>
1375
+ <pre><code>[alert type=&quot;success&quot;] ... [/alert]</code></pre>
1376
  <h4 id="-alert-parameters">[alert] parameters</h4>
1377
  <table>
1378
  <thead>
1518
  <h3 id="media-objects">Media Objects</h3>
1519
  <pre><code>[media]
1520
  [media-object pull=&quot;right&quot;]
1521
+ ...
1522
  [/media-object]
1523
  [media-body title=&quot;Testing&quot;]
1524
+ ...
1525
  [/media-body]
1526
  [/media]</code></pre>
1527
  <h4 id="-media-parameters">[media] parameters</h4>
1629
  <h4 id="basic-example">Basic Example</h4>
1630
  <pre><code>[list-group]
1631
  [list-group-item]
1632
+ ...
1633
  [/list-group-item]
1634
  [list-group-item]
1635
+ ...
1636
  [/list-group-item]
1637
  [list-group-item]
1638
+ ...
1639
  [/list-group-item]
1640
  [/list-group]</code></pre>
1641
  <h4 id="linked-items">Linked Items</h4>
1642
  <pre><code>[list-group linked=&quot;true&quot;]
1643
  [list-group-item link=&quot;#&quot; active=&quot;true&quot;]
1644
+ ...
1645
  [/list-group-item]
1646
  [list-group-item link=&quot;#&quot;]
1647
+ ...
1648
  [/list-group-item]
1649
  [list-group-item link=&quot;#&quot;]
1650
+ ...
1651
  [/list-group-item]
1652
  [/list-group]</code></pre>
1653
  <h4 id="custom-content">Custom Content</h4>
1654
  <pre><code>[list-group linked=&quot;true&quot;]
1655
  [list-group-item link=&quot;#&quot; active=&quot;true&quot;]
1656
+ [list-group-item-heading]...[/list-group-item-heading]
1657
+ [list-group-item-text]...[/list-group-item-text]
1658
  [/list-group-item]
1659
  [list-group-item link=&quot;#&quot;]
1660
+ [list-group-item-heading]...[/list-group-item-heading]
1661
+ [list-group-item-text]...[/list-group-item-text]
1662
  [/list-group-item]
1663
  [list-group-item link=&quot;#&quot;]
1664
+ [list-group-item-heading]...[/list-group-item-heading]
1665
+ [list-group-item-text]...[/list-group-item-text]
1666
  [/list-group-item]
1667
  [/list-group]</code></pre>
1668
  <h4 id="-list-group-parameters">[list-group] parameters</h4>
1815
  <p><a href="http://getbootstrap.com/components/#list-group">Bootstrap list groups documentation</a></p>
1816
  <hr>
1817
  <h3 id="panels">Panels</h3>
1818
+ <pre><code>[panel type=&quot;info&quot; heading=&quot;Panel Title&quot; footer=&quot;Footer text&quot;] ... [/panel]</code></pre>
1819
  <h4 id="-panel-parameters">[panel] parameters</h4>
1820
  <table>
1821
  <thead>
1875
  <p><a href="http://getbootstrap.com/components/#panels">Bootstrap panels documentation</a></p>
1876
  <hr>
1877
  <h3 id="wells">Wells</h3>
1878
+ <pre><code>[well size=&quot;sm&quot;] ... [/well]</code></pre>
1879
  <h4 id="-well-parameters">[well] parameters</h4>
1880
  <table>
1881
  <thead>
1917
  <h3 id="tabs">Tabs</h3>
1918
  <pre><code>[tabs type=&quot;tabs&quot;]
1919
  [tab title=&quot;Home&quot; active=&quot;true&quot;]
1920
+ ...
1921
  [/tab]
1922
  [tab title=&quot;Profile&quot;]
1923
+ ...
1924
  [/tab]
1925
  [tab title=&quot;Messages&quot;]
1926
+ ...
1927
  [/tab]
1928
  [/tabs]</code></pre>
1929
  <h4 id="-tabs-parameters">[tabs] parameters</h4>
2013
  <p><a href="http://getbootstrap.com/javascript/#tabs">Bootstrap tabs documentation</a></p>
2014
  <hr>
2015
  <h3 id="tooltip">Tooltip</h3>
2016
+ <pre><code>[tooltip title=&quot;I&#39;m the title&quot; placement=&quot;right&quot;] ... [/tooltip]</code></pre>
2017
  <h4 id="-tooltip-parameters">[tooltip] parameters</h4>
2018
  <table>
2019
  <thead>
2059
  <p><a href="http://getbootstrap.com/javascript/#tooltips">Bootstrap tooltip documentation</a></p>
2060
  <hr>
2061
  <h3 id="popover">Popover</h3>
2062
+ <pre><code>[popover title=&quot;I&#39;m the title&quot; text=&quot;And here&#39;s some amazing content. It&#39;s very engaging. right?&quot; placement=&quot;right&quot;] ... [/popover]</code></pre>
2063
  <h4 id="-popover-parameters">[popover] parameters</h4>
2064
  <table>
2065
  <thead>
2114
  <h3 id="collapse">Collapse</h3>
2115
  <pre><code>[collapsibles]
2116
  [collapse title=&quot;Collapse 1&quot; active=&quot;true&quot;]
2117
+ ...
2118
  [/collapse]
2119
  [collapse title=&quot;Collapse 2&quot;]
2120
+ ...
2121
  [/collapse]
2122
  [collapse title=&quot;Collapse 3&quot;]
2123
+ ...
2124
  [/collapse]
2125
  [/collapsibles]</code></pre>
2126
  <h4 id="-collapsibles-parameters">[collapsibles] parameters</h4>
2204
  <hr>
2205
  <h3 id="carousel">Carousel</h3>
2206
  <pre><code>[carousel]
2207
+ [carousel-item active=&quot;true&quot;] ... [/carousel-item]
2208
+ [carousel-item] ... [/carousel-item]
2209
+ [carousel-item] ... [/carousel-item]
2210
  [/carousel]</code></pre>
2211
  <p>[carousel-item] wraps an HTML image tag or image inserted via the WordPress editor.</p>
2212
  <h4 id="-carousel-parameters">[carousel] parameters</h4>
2297
  <hr>
2298
  <h3 id="modal">Modal</h3>
2299
  <pre><code>[modal text=&quot;This is my modal&quot; title=&quot;Modal Title Goes Here&quot; xclass=&quot;btn btn-primary btn-large&quot;]
2300
+ ...
2301
  [modal-footer]
2302
  [button type=&quot;primary&quot; link=&quot;#&quot; data=&quot;dismiss,modal&quot;]Dismiss[/button]
2303
  [/modal-footer]
includes/help/README.jst ADDED
@@ -0,0 +1 @@
 
1
+ <%=content%>
includes/help/bs-font.css CHANGED
@@ -12,7 +12,8 @@
12
  .bs_bootstrap-logo {
13
  padding: 0 3px;
14
  }
15
- .wp-media-buttons .add_media span.bs_bootstrap-logo:before {
 
16
  font-family: 'bss4wp' !important;
17
  content: "\e600" !important;
18
  color: #6f5499 !important;
@@ -27,3 +28,6 @@
27
  -webkit-font-smoothing: antialiased;
28
  -moz-osx-font-smoothing: grayscale;
29
  }
 
 
 
12
  .bs_bootstrap-logo {
13
  padding: 0 3px;
14
  }
15
+ .wp-media-buttons .add_media span.bs_bootstrap-logo:before,
16
+ .mce-i-bootstrap-shortcodes:before {
17
  font-family: 'bss4wp' !important;
18
  content: "\e600" !important;
19
  color: #6f5499 !important;
28
  -webkit-font-smoothing: antialiased;
29
  -moz-osx-font-smoothing: grayscale;
30
  }
31
+ #wp_fs_bootstrap-shortcodes {
32
+ font-size: 14px !important;
33
+ }
includes/help/css/bootstrap-modal.css CHANGED
@@ -43,7 +43,7 @@ button.close {
43
  right: 0;
44
  bottom: 0;
45
  left: 0;
46
- z-index: 10000;
47
  -webkit-overflow-scrolling: touch;
48
  outline: 0;
49
  }
43
  right: 0;
44
  bottom: 0;
45
  left: 0;
46
+ z-index: 100050;
47
  -webkit-overflow-scrolling: touch;
48
  outline: 0;
49
  }
includes/help/css/bootstrap-shortcodes-help.css CHANGED
@@ -1,3 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #bootstrap-shortcodes-help h1,
2
  #bootstrap-shortcodes-help h1+p {
3
  display: none;
@@ -21,6 +44,19 @@
21
  background-color: #fff;
22
  }
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  /* CSS crunched with Crunch - http://crunchapp.net/ */
25
  #bootstrap-shortcodes-help {
26
  /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
1
+ /* Fix for WPEngine's stylesheets */
2
+ #bootstrap-shortcodes-help.modal {
3
+ display: none;
4
+ overflow: auto;
5
+ overflow-y: scroll;
6
+ position: fixed;
7
+ top: 0;
8
+ right: 0;
9
+ bottom: 0;
10
+ left: 0;
11
+ z-index: 500000;
12
+ -webkit-overflow-scrolling: touch;
13
+ outline: 0;
14
+ background-color: transparent;
15
+ width: auto;
16
+ margin: 0 auto;
17
+
18
+ }
19
+ #bootstrap-shortcodes-help .modal-body {
20
+ max-height: none;
21
+ }
22
+ /* END Fix for WPEngine's stylesheets */
23
+
24
  #bootstrap-shortcodes-help h1,
25
  #bootstrap-shortcodes-help h1+p {
26
  display: none;
44
  background-color: #fff;
45
  }
46
 
47
+ .bootstrap-shortcodes-button {
48
+ padding-left: auto !important;
49
+ padding-right: 8px !important;
50
+ }
51
+
52
+ @media (min-width: 782px) {
53
+ .bootstrap-shortcodes-button {
54
+ padding-left: 0px !important;
55
+ padding-right: 0px !important;
56
+ }
57
+ }
58
+
59
+
60
  /* CSS crunched with Crunch - http://crunchapp.net/ */
61
  #bootstrap-shortcodes-help {
62
  /*! normalize.css v2.1.3 | MIT License | git.io/normalize */
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: 3.9
6
- Stable tag: 3.2.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -71,6 +71,18 @@ No, we assume you are already working with a WordPress theme that includes the B
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  = 3.2.3 =
75
  * Fix conflicts with other plugins, like Gravity Forms, which use Bootstrap on the WordPress back-end.
76
 
2
  Contributors: filipstefansson, nodley, FoolsRun
3
  Tags: bootstrap, shortcode, shortcodes, responsive, grid
4
  Requires at least: 3.8
5
+ Tested up to: 4.0
6
+ Stable tag: 3.2.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
71
 
72
  == Changelog ==
73
 
74
+ = 3.2.4 =
75
+ * NOTE: this update changes the way the [table-wrap], [tooltip], [popover], [page-header], [img], and [media-object] shortcodes function to better correct for unexpected input. Please report any problems you have with these shortcodes following this update.
76
+ * Add Bootstrap shortcode help popup button to Distraction Free Writing Mode toolbar
77
+ * Better responsive styles for help popup button on smaller screens
78
+ * Better correction for malformed or unexpected input in [table-wrap], [tooltip], [popover], [page-header], [img], and [media-object]s
79
+ * Fix display problems for WP-Engine users
80
+ * Fix documentation for [popover]
81
+ * Better handling of Gravity Forms' "No Conflict Mode"
82
+ * Fix conflict with All-In-One Events Calendar
83
+ * Fix for some situations where the help-tab popup would be behind other popup elements.
84
+ * WordPress 4.0 support!
85
+
86
  = 3.2.3 =
87
  * Fix conflicts with other plugins, like Gravity Forms, which use Bootstrap on the WordPress back-end.
88