If an ACF field requires a longer instruction text, the layout of the edit screen is messy and a lot of space is wasted.
如果ACF字段需要更长的指令文本,则编辑屏幕的布局会混乱,并且会浪费大量空间。 p>
The ACF Tooltip plugin hides the field instructions, adds a help symbol to the field labels and generates a tooltip based on the instruction text.
ACF Tooltip插件可隐藏字段说明,在字段标签中添加帮助符号,并根据说明文本生成工具提示。 p>
New in Version 1.2.0
1.2.0版的新功能 h4>
The tooltip will not hide if moused over, allowing create a tooltip with a link inside without hiding the tooltip.
如果将鼠标悬停在工具提示上,则不会隐藏该工具提示,从而允许在不隐藏工具提示的情况下创建带有链接的工具提示。 p>
Custom settings
自定义设置 h4>
There are 7 filters that allow adjusting the design and the behavior of the tooltips.
有7个过滤器可以调整工具提示的设计和行为。 p>
This plugin works only with the ACF PRO (version 5.5.0 or higher) 此插件仅适用于 ACF PRO (5.5.0或更高版本) .
strong> p>。
Localizations
本地化 h4>
- English
- 英语 li>
- Deutsch
- Deutsch li>
ul>
Custom settings with filter hooks
带有过滤器挂钩的自定义设置 h3>
There are 7 filters that allow adjusting the design and the behavior of the tooltips can be adjusted.
有7个过滤器可以调整设计,并且可以调整工具提示的行为。 p>
Set the design of the tooltips
设置工具提示的设计 h4>
<?phpfunction acf_tooltip_style() {
函数acf_tooltip_style(){
$style = 'qtip-acf';
$ style ='qtip-acf';
return $style;
返回$ style;
}
}
add_filter('acf/tooltip/style', 'acf_tooltip_style');
add_filter('acf / tooltip / style','acf_tooltip_style');
?>
?>
code> pre>
The available styles can be found on the qTip options page and are shown on the 可用样式可以在 q提示选项页面中找到,并显示在"http://qtip2.com/demos/" rel="nofollow">qTip demo site
.
“ http://qtip2.com/demos/” rel =“ nofollow”> qTip演示站点
。 p>
You can mix the styles;
您可以混合样式;
e.g.
例如
“qtip-acf qtip-rounded qtip-shadow”
“ qtip-acf qtip-rounded qtip-shadow” p>
If you like, you can define your own style, with the class name of your style from your own CSS file (see next filter).
如果愿意,可以使用自己的CSS文件中的样式类名定义自己的样式(请参见下一个过滤器)。 p>
The qtip-acf style is the standard style, which is set without a filter.
qtip-acf样式是标准样式,设置时没有过滤器。 p>
Define your own CSS file
定义您自己的CSS文件 h4>
<?phpfunction acf_tooltip_css() {
函数acf_tooltip_css(){
$css_file = get_bloginfo('template_url') .
$ css_file = get_bloginfo('template_url')。
'/qtip-own.css';
'/qtip-own.css';
// if the file is saved in your themes folder
//如果文件保存在主题文件夹中
return $css_file;
返回$ css_file;
}
}
add_filter('acf/tooltip/css', 'acf_tooltip_css');
add_filter('acf / tooltip / css','acf_tooltip_css');
?>
?>
code> pre>
You will find a ‘qtip-example-style.css’ in the ‘/assets/css’ folder.
您将在“ / assets / css”文件夹中找到一个“ qtip-example-style.css”。 p>
Positioning the corner of the tooltip
将工具提示的位置定位 h4>
<?phpfunction acf_tooltip_position_my() {
函数acf_tooltip_position_my(){
$position_my = 'center left';
$ position_my ='居中左';
return $position_my;
返回$ position_my;
}
}
add_filter('acf/tooltip/position/my', 'acf_tooltip_position_my');
add_filter('acf / tooltip / position / my','acf_tooltip_position_my');
?>
?>
code> pre>
Position in relation to the tooltip icon
与工具提示图标相关的位置 h4>
<?phpfunction acf_tooltip_position_at() {
函数acf_tooltip_position_at(){
$position_at = 'center right';
$ position_at ='中央右';
return $position_at;
返回$ position_at;
}
}
add_filter('acf/tooltip/position/at', 'acf_tooltip_position_at');
add_filter('acf / tooltip / position / at','acf_tooltip_position_at');
?>
?>
code> pre>
Check out the qTip demo site to find your perfect positioning.
访问 qTip演示网站,找到最合适的位置。 p>
Apply tooltips only to fields with specific class
仅将工具提示应用于具有特定类别的字段 h4>
<?phpfunction acf_tooltip_class() {
函数acf_tooltip_class(){
$class = 'with__tooltip';
$ class ='with__tooltip';
// edit this to your prefered class name
//将其编辑为您喜欢的班级名称
return $class;
返回$ class;
}
}
add_filter('acf/tooltip/class/only', 'acf_tooltip_class');
add_filter('acf / tooltip / class / only','acf_tooltip_class');
?>
?>
code> pre>
Add the class to the fields where you want to show tooltips.
将类添加到要显示工具提示的字段中。 p>
Exclude tooltips on fields with specific class
排除具有特定类别的字段上的工具提示 h4>
<?phpfunction acf_tooltip_class_exclude() {
函数acf_tooltip_class_exclude(){
$class = 'no__tooltip';
$ class ='no__tooltip';
// edit this to your prefered class name
//将其编辑为您喜欢的班级名称
return $class;
返回$ class;
}
}
add_filter('acf/tooltip/class/exclude', 'acf_tooltip_class_exclude');
add_filter('acf / tooltip / class / exclude','acf_tooltip_class_exclude');
?>
?>
code> pre>
Add the class to the fields where you don’t want to show tooltips.
将课程添加到您不想显示工具提示的字段中。 p>
Add tooltips to the Field Editor
在字段编辑器中添加工具提示 h4>
With this filter, you can specify whether the instructions in the Field Editor are displayed as tooltips as well.
使用此过滤器,您可以指定是否在“字段编辑器”中的指令也显示为工具提示。
By default, the instructions are displayed.
默认情况下,显示说明。 p>
<?phpadd_filter('acf/tooltip/fieldeditor', '__return_true');
add_filter('acf / tooltip / fieldeditor','__return_true');
?>
?>
code> pre>