Agnosia Bootstrap Carousel hooks the [gallery]
shortcode with attribute type="carousel"
in order to show a Bootstrap Carousel based on the selected images and their titles and descriptions.
/ javascript /#carousel“ rel =” nofollow“> Bootstrap Carousel (基于所选图片及其标题和描述)。 p>
This plugin assumes either your theme includes the necessary Bootstrap javascript and CSS files to display the carousel properly, or that you have included those files on your own.
此插件假定您的主题包含必要的Bootstrap javascript和CSS文件以正确显示轮播,或者您自己包含了这些文件。
It will not include the files for you, so if they are not present, the carousel will not work and you will only obtain its bare HTML.
它不会为您提供文件,因此,如果文件不存在,则轮播将无法正常工作,您只能获取其裸露的HTML。 p>
Basic example:
基本示例: h4>
[gallery type="carousel" ids="61,60,59"] [图库类型=“ carousel” ids =“ 61,60,59”]
code> pre>
Required attributes:
必填属性: h4>
type
: it needs to be type="carousel"
.-
type code>:它必须为 type =“ carousel” code>。 li>ids
: you must provide a list of ids
corresponding to attachments, like ids="1,2,3"
.-
ids code>:您必须提供与附件相对应的 ids code>列表,例如 ids =“ 1,2,3” code>。 li>
li>
ul>
Otherwise, the default [gallery]
shortcode function will be processed instead of this plugin’s one.
否则,将处理默认的 [gallery] code>短代码功能,而不是此插件的功能。 p>Optional attributes:
可选属性: h4>
name
: any name.-
名称 code>:任意名称。String will be sanitize to be used as an HTML ID.
字符串将被清理以用作HTML ID。
Recommended when you want to have more than one carousel in the same page.
如果您希望在同一页面中有多个旋转木马,则推荐使用。
Default: agnosia-bootstrap-carousel.
默认值: agnosia-bootstrap-carousel em>。Example: [gallery type="carousel" ids="61,60,59" name="myCarousel"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” name =“ myCarousel”] code> li>indicators
: indicators position.-
指标 code>:指标位置。Accepted values: before-inner, after-inner, after-control, false (hides indicators).
接受的值:内在 em>,内在 em>,后控制 em>, false em>(隐藏指示符)。Default: before-inner.
默认值:内在 em>。Example: [gallery type="carousel" ids="61,60,59" indicators="after-inner"]
例如: [画廊类型=“ carousel” ids =“ 61,60,59” indicator =“后内部”] code> li>width
: carousel container width, in px
or %
.-
width code>:轮播容器宽度,以 px code>或% code>为单位。Default: not set.
默认值:未设置。
Example: [gallery type="carousel" ids="61,60,59" width="800px"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” width =“ 800px”] code> li>height
: carousel item height, in px
or %
.-
height code>:轮播项目的高度,以 px code>或% code>为单位。Default: not set.
默认值:未设置。
Example: [gallery type="carousel" ids="61,60,59" height="400px"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” height =“ 400px”] code> li>titletag
: define HTML tag for image title.-
titletag code>:定义图像标题的HTML标签。Default: h4.
默认值: h4 em>。Example: [gallery type="carousel" ids="61,60,59" titletag="h2"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” titletag =“ h2”] code> li>wpautop
: auto-format text.-
wpautop code>:自动格式化文本。Default: true.
默认值: true em>。Example: [gallery type="carousel" ids="61,60,59" wpautop="false"]
示例: [图库类型=“ carousel” ids =“ 61,60,59” wpautop =“ false”] code> li>title
: show or hide image title.-
title code>:显示或隐藏图像标题。Set false to hide.
将 false em>设置为隐藏。Default: true.
默认值: true em>。Example: [gallery type="carousel" ids="61,60,59" title="false"]
示例: [图库类型=“ carousel” ids =“ 61,60,59” title =“ false”] code> li>text
: show or hide image text.-
文本 code>:显示或隐藏图像文本。Set false to hide.
将 false em>设置为隐藏。Default: true.
默认值: true em>。Example: [gallery type="carousel" ids="61,60,59" text="false"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” text =“ false”] code> li>containerclass
: extra class for carousel container.-
containerclass code>:轮播容器的额外类。Default: not set.
默认值:未设置。
Example: [gallery type="carousel" ids="61,60,59" containerclass="container"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” containerclass =“ container”] code> li>itemclass
: extra class for carousel item.-
itemclass code>:轮播项目的额外类。Default: not set.
默认值:未设置。
Example: [gallery type="carousel" ids="61,60,59" itemclass="container"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” itemclass =“ container”] code> li>captionclass
: extra class for item caption.-
captionclass code>:项目标题的额外类。Default: not set.
默认值:未设置。
Example: [gallery type="carousel" ids="61,60,59" captionclass="container"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” captionclass =“ container”] code> li>control
: control arrows display.-
control code>:显示控制箭头。Accepted values: true (to show), false (to hide).
接受的值: true em>(显示), false em>(隐藏)。Default: true.
默认值: true em>。Example: [gallery type="carousel" ids="61,60,59" control="false"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” control =“ false”] code> li>interval
: the amount of time to delay between automatically cycling an item.-
interval code>:自动循环项目之间的延迟时间。If false, carousel will not automatically cycle.
如果 false em>,则轮播不会自动循环。Default: 5000.
默认值: 5000 em>。Example: [gallery type="carousel" ids="61,60,59" interval="2000"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” interval =“ 2000”] code> li>pause
: pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.-
pause code>:暂停在mouseenter上的轮播循环,并在mouseleave上恢复轮播的循环。Default: “hover”.
默认值:“悬停” em>。Example: [gallery type="carousel" ids="61,60,59" interval="hover"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” interval =“ hover”] code> li>size
: size for image attachment.-
size code>:图像附件的大小。Accepted values: thumbnail, medium, large, full.
接受的值:缩略图 em>,中 em>,大 em>,完整 em>。Default: full.
默认值:完整 em>。See wp_get_attachment_image_src() for further reference.
请参阅 wp_get_attachment_image_src()以获取更多参考。
Example: [gallery type="carousel" ids="61,60,59" size="full"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” size =“ full”] code> li>
ul>
Native supported attributes:
本机支持的属性: h4>
orderby
: Alternative order for your images.-
orderby code>:图像的替代顺序。Example: [gallery type="carousel" ids="61,60,59" orderby="rand"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” orderby =“ rand”] code> li>link
: where your image titles will link to.-
链接 code>:图像标题将链接到的位置。Accepted values: file, none and empty.
可接受的值:文件 em>,无 em>和为空。An empty value will link to your attachment’s page.
空值将链接到您附件的页面。
Example: [gallery type="carousel" ids="61,60,59" link="file"]
例如: [图库类型=“ carousel” ids =“ 61,60,59” link =“ file”] code> li>
ul>
Extending
扩展 h4>
This plugin offers hooks for actions and filters, so you can modify its functionality or add your own.
此插件为操作和过滤器提供了钩子,因此您可以修改其功能或添加自己的功能。 p>
Action hooks:
动作挂钩: p>
agnosia_bootstrap_carousel_before_init
: Do something before the carousel is loaded.-
agnosia_bootstrap_carousel_before_init code>:在轮播加载之前执行一些操作。 li>agnosia_bootstrap_carousel_init
: Do something after the carousel is loaded.-
agnosia_bootstrap_carousel_init code>:在轮播加载后执行一些操作。 li>
ul>
Filter hooks:
过滤器挂钩: p>
agnosia_bootstrap_carousel_attributes
: Modify the attributes passed to the shortcode.-
agnosia_bootstrap_carousel_attributes code>:修改传递给短代码的属性。 li>agnosia_bootstrap_carousel_posts
: Modify the $post
objects that the shortcode is using.-
agnosia_bootstrap_carousel_posts code>:修改简码正在使用的 $ post code>对象。 li>agnosia_bootstrap_carousel_container_style
: Modify the carousel container style.-
agnosia_bootstrap_carousel_container_style code>:修改轮播容器样式。 li>agnosia_bootstrap_carousel_item_style
: Modify the style of the carousel items.-
agnosia_bootstrap_carousel_item_style code>:修改轮播项目的样式。 li>agnosia_bootstrap_carousel_output
: Modify the full HTML output of the carousel.-
agnosia_bootstrap_carousel_output code>:修改轮播的完整HTML输出。 li>agnosia_bootstrap_carousel_container
: Modify the HTML output of the carousel container tag.-
agnosia_bootstrap_carousel_container code>:修改轮播容器标签的HTML输出。 li>agnosia_bootstrap_carousel_inner
: Modify the HTML output of the carousel inner tag.-
agnosia_bootstrap_carousel_inner code>:修改轮播内部标签的HTML输出。 li>agnosia_bootstrap_carousel_caption_container
: Modify the HTML output of the caption container tag.-
agnosia_bootstrap_carousel_caption_container code>:修改字幕容器标签的HTML输出。 li>agnosia_bootstrap_carousel_img_container
: Modify the HTML output of the image container tag.-
agnosia_bootstrap_carousel_img_container code>:修改图像容器标签的HTML输出。 li>agnosia_bootstrap_carousel_img
: Modify the HTML output of the item image tag.-
agnosia_bootstrap_carousel_img code>:修改商品图片标签的HTML输出。 li>agnosia_bootstrap_carousel_excerpt
: Modify the HTML output of the image caption.-
agnosia_bootstrap_carousel_excerpt code>:修改图像标题的HTML输出。 li>agnosia_bootstrap_carousel_indicators
: Modify the HTML output of the indicators element.-
agnosia_bootstrap_carousel_indicators code>:修改指标元素的HTML输出。 li>agnosia_bootstrap_carousel_control
: Modify the HTML output of the control element.-
agnosia_bootstrap_carousel_control code>:修改控件元素的HTML输出。 li>agnosia_bootstrap_carousel_javascript
: Modify the output of the carousel Javascript.-
agnosia_bootstrap_carousel_javascript code>:修改轮播Javascript的输出。 li>agnosia_bootstrap_carousel_make_array
: Modify the list of $post
IDs that the carousel is using.-
agnosia_bootstrap_carousel_make_array code>:修改该轮播使用的 $ post code> ID列表。 li>
ul>
Contributing
贡献 h4>
You can make suggestions and submit your own modifications to this plugin on Github.<
您可以在 Github 上提出建议并提交对此插件的自己的修改。
/p>
/ p>
For more information, visit our website.
有关更多信息,请访问我们的网站。 p>