WordPress 短代码,可更轻松地在内容中使用 Bootstrap 元素。
WordPress plugin that provides shortcodes for easier use of the Bootstrap styles and components in your content.
Bootstrap 3 Shortcodes for WordPress creates a simple, out of the way button just above the WordPress TinyMCE editor (next to the "Add Media" button) which pops up the plugin's documentation and shortcode examples for reference and handy "Insert Example" links to send the example shortcodes straight to the editor. There are no additional TinyMCE buttons to clutter up your screen, just great, easy to use shortcodes!
This plugin won't do anything if you don't have WordPress theme built with the Bootstrap framework. This plugin does not include the Bootstrap framework.
The plugin is tested to work with Bootstrap 3 and WordPress 4.9+ and requires PHP 5.3 or later.
[row]
[column md="6"]
...
[/column]
[column md="6"]
...
[/column]
[/row]The container component is also supported in case your theme doesn't include a container.
[container]
[row]
[column md="6"]
...
[/column]
[column md="6"]
...
[/column]
[/row]
[/container]The container-fluid component is supported as a discrete shortcode for cases where you want to wrap a container.
[container-fluid]
[container]
[row]
[column md="6"]
...
[/column]
[column md="6"]
...
[/column]
[/row]
[/container]
[/container-fluid]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| fluid | Is the container fluid? (see Bootstrap documentation for details) | optional | true, false | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| xs | Size of column on extra small screens (less than 768px) | optional | 1-12 | false |
| sm | Size of column on small screens (greater than 768px) | optional | 1-12 | false |
| md | Size of column on medium screens (greater than 992px) | optional | 1-12 | false |
| lg | Size of column on large screens (greater than 1200px) | optional | 1-12 | false |
| offset_xs | Offset on extra small screens | optional | 1-12 | false |
| offset_sm | Offset on small screens | optional | 1-12 | false |
| offset_md | Offset on column on medium screens | optional | 1-12 | false |
| offset_lg | Offset on column on large screens | optional | 1-12 | false |
| pull_xs | Pull on extra small screens | optional | 1-12 | false |
| pull_sm | Pull on small screens | optional | 1-12 | false |
| pull_md | Pull on column on medium screens | optional | 1-12 | false |
| pull_lg | Pull on column on large screens | optional | 1-12 | false |
| push_xs | Push on extra small screens | optional | 1-12 | false |
| push_sm | Push on small screens | optional | 1-12 | false |
| push_md | Push on column on medium screens | optional | 1-12 | false |
| push_lg | Push on column on large screens | optional | 1-12 | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
[lead] ... [/lead]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap body copy documentation
[emphasis type="success"] ... [/emphasis]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| type | The type of label to display | required | muted, primary, success, info, warning, danger | muted |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap emphasis classes documentation
[code] ... [/code]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| inline | Display inline code | optional | true, false | false |
| scrollable | Set a max height of 350px and provide a scroll bar. Not usable with inline="true". | optional | true, false | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
[table-wrap bordered="true" striped="true"]
Standard HTML table code goes here.
[/table-wrap]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| bordered | Set "bordered" table style (see Bootstrap documentation) | optional | true, false | false |
| striped | Set "striped" table style (see Bootstrap documentation) | optional | true, false | false |
| hover | Set "hover" table style (see Bootstrap documentation) | optional | true, false | false |
| condensed | Set "condensed" table style (see Bootstrap documentation) | optional | true, false | false |
| responsive | Wrap the table in a div with the class "table-respsonve" (see Bootstrap documentation) | optional | true, false | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
[button type="success" size="lg" link="#"] ... [/button]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| type | The type of the button | optional | default, primary, success, info, warning, danger, link | default |
| size | The size of the button | optional | xs, sm, lg | none |
| block | Whether the button should be a block-level button | optional | true, false | false |
| dropdown | Whether the button triggers a dropdown menu (see Button Dropdowns) | optional | true, false | false |
| active | Apply the "active" style | optional | true, false | false |
| disabled | Whether the button be disabled | optional | true, false | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| link | The url you want the button to link to | optional | any valid link | none |
| target | Target for the link | optional | any valid target | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap button documentation
[img type="circle" responsive="true"] ... [/img]Wrap any number of HTML image tags or images inserted via the WordPress media manager.
| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| type | The effect to apply to wrapped images | optional | rounded, circle, thumbnail | false |
| responsive | Make the wrapped images responsive | optional | true, false | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap images documentation
[embed-responsive ratio="16by9"] ... [/embed-responsive]Wrap , , , and elements to make them responsive.
| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| ratio | Maintain the aspect ratio of the embed | optional | 16by9, 4by3 | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap responsive embed documentation
[responsive block="lg md" hidden="sn xs"] ... [/responsive]| Parameter | Description | Required | Values | Default |
|---|---|---|---|---|
| visible | Sizes at which this element is visible (separated by spaces) NOTE: as of Bootstrap 3.2 "visible" is deprecated in favor of "block", "inline", and "inline-block" (see below) | optional | xs, sm, md, lg | false |
| hidden | Sizes at which this element is hidden (separated by spaces) | optional | xs, sm, md, lg | false |
| block | Sizes at which this element is visible and displayed as a "block" element (separated by spaces) | optional | xs, sm, md, lg | false |
| inline | Sizes at which this element is visible and displayed as an "inline" element (separated by spaces) | optional | xs, sm, md, lg | false |
| inline_block | Sizes at which this element is visible and displayed as an "inline-block" element (separated by spaces) | optional | xs, sm, md, lg | false |
| xclass | Any extra classes you want to add | optional | any text | none |
| data | Data attribute and value pairs separated by a comma. Pairs separated by pipe (see example at Button Dropdowns). | optional | any text | none |
Bootstrap responsive utilities documentation
[icon type="arrow-right"]暂无开放 Issues,或尚未同步最近议题。