[wordpress插件] Advanced Custom Fields: Bootstrap Button高级自定义字段:自举按钮

wordpress 插件 文章 2020-01-26 06:00 578 0 全屏看文

AI助手支持GPT4.0

评分

0

0

描述

This plugin adds a field for creating a Bootstrap 3 or 4 button for the popular plugin Advanced Custom Fields.

此插件添加了一个字段,用于为流行的插件“高级自定义字段”创建Bootstrap 3或4按钮。

In addition to supporting all Bootstrap 3 or 4 options, you can insert an internal or external link with the link picker.

除了支持所有Bootstrap 3或4选项之外,您还可以使用链接选择器插入内部或外部链接。

General Configuration Options:

常规配置选项:

1.

  1。

Text button.

文字按钮。

2. HTML tags (a, button, input, submit).

2. HTML标签(a,按钮,输入,提交)。

3. Block Level Buttons

3.块级按钮

4. Active or disabled button status.

4.激活或禁用的按钮状态。

5. Additional CSS class (For any customizations).

5.其他CSS类(用于任何自定义)。

6. Internal or external link with link picker.

6.具有链接选择器的内部或外部链接。

7. Rel attribute for links (Alternate, Author, Bookmark, External, Help, License, Next, Nofollow, Noreferrer, Noopener, Prev, Search, Tag)

7.链接的Rel属性(备用,作者,书签,外部,帮助,许可,下一步,Nofollow,Noreferrer,Noopener,Prev,搜索,标签)

Bootstrap 3 Configuration Options:

Bootstrap 3配置选项:

1.

  1。

Button Style (Default, Primary, Success, Information, Warning, Danger, Link).

按钮样式(默认,主要,成功,信息,警告,危险,链接)。

2. Button Size (Default, Large, Small, Extra Small).

2.按钮大小(默认,大,小,超小)。

Bootstrap 4 Configuration Options:

Bootstrap 4配置选项:

1.

  1。

Button Style (Primary, Secondary, Success, Danger, Warning, Info, Light, Dark, Link).

按钮样式(主要,次要,成功,危险,警告,信息,浅色,深色,链接)。

2. Button without background color

2.没有背景色的按钮

3. Button Size (Default, Large, Small).

3.按钮大小(默认,大,小)。

Points from 1 to 6 in General Configuration Options and Points from 1 to 3 in Bootstrap 3 or 4 Configuration Options can be configured with

可以使用

常规配置选项中的1到6点以及 Bootstrap 3 4个配置选项中的1到3点进行配置。

default values and you can choose whether or not to display these options on the page or post, where this custom field was added.

默认值,您可以选择是否在添加此自定义字段的页面或帖子上显示这些选项。

For more information on points from 2 to 4 in General Configuration Options and for Bootstrap 3 or 4 Configuration Options refer to the Bootstrap documentation 3.3.7[https:/

有关“常规配置选项”中2到4点以及 Bootstrap 3 4配置选项的更多信息,请参考Bootstrap文档3.3.7 [https:/

/getbootstrap.com/docs/3.3/css/#buttons] or Bootstrap 4.1[https://getbootstrap.com/docs/4.1/components/buttons/].

/getbootstrap.com/docs/3.3/css/#buttons]或Bootstrap 4.1 [https://getbootstrap.com/docs/4.1/components/buttons/]。

How to use it

使用方法

The plugin does not include the Bootstrap 3 css in the theme in order to be able to display it correctly, it is necessary to insert the Bootstrap 3 css in the theme, following the guidelines of WordPress: Including CSS & JavaScript.<

该插件在主题中不包含Bootstrap 3 css,以便能够正确显示它,有必要按照WordPress的准则在主题中插入Bootstrap 3 css:包括CSS和JavaScript。

/p>

/ p>

To view the button in the front end, a function has been implemented, which will facilitate the operation.

要查看前端的按钮,已实现一个功能,该功能将有助于操作。

This function will only read the values of the button and return the correct HTML.

此函数将仅读取按钮的值并返回正确的HTML。

//With echo 

  //带有回显 

acf_bbutton_render(get_field('my-bbutton')); 

acf_bbutton_render(get_field('my-bbutton')); 

//Without echo.

//没有回声。

Returns only the button's string 

仅返回按钮的字符串 

acf_bbutton_render(get_field('my-bbutton'), false);

acf_bbutton_render(get_field('my-bbutton'),false);

Compatibility

兼容性

This ACF field type is compatible with:

此ACF字段类型兼容:

* ACF 4

* ACF 4

* ACF 5

* ACF 5

* Bootstrap 3.3.7

* Bootstrap 3.3.7

* Bootstrap 4.+

* Bootstrap 4。+

安装步骤

    1. Copy the acf-bootstrap-button folder into your wp-content/plugins folder
    2. acf-bootstrap-button 文件夹复制到您的 wp-content / plugins 文件夹

    3. Activate the Advanced Custom Fields: Bootstrap Button plugin via the plugins admin page
    4. 通过插件管理页面激活“高级自定义字段:Bootstrap Button”插件

    5. Create a new field via ACF and select the Button type
    6. 通过ACF创建新字段,然后选择“按钮”类型

    7. Please refer to the plugin description for more info regarding the field type settings
    8. 有关字段类型设置的更多信息,请参阅插件说明

下载地址

https://downloads.wordpress.org/plugin/acf-bootstrap-button.zip

https://downloads.wordpress.org/plugin/acf-bootstrap-button.zip

-EOF-

AI助手支持GPT4.0