[wordpress插件] ACF TooltipACF工具提示

wordpress 插件 文章 2020-01-27 16:40 499 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

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字段需要更长的指令文本,则编辑屏幕的布局会混乱,并且会浪费大量空间。

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插件可隐藏字段说明,在字段标签中添加帮助符号,并根据说明文本生成工具提示。

New in Version 1.2.0

1.2.0版的新功能

The tooltip will not hide if moused over, allowing create a tooltip with a link inside without hiding the tooltip.

如果将鼠标悬停在工具提示上,则不会隐藏该工具提示,从而允许在不隐藏工具提示的情况下创建带有链接的工具提示。

Custom settings

自定义设置

There are 7 filters that allow adjusting the design and the behavior of the tooltips.

有7个过滤器可以调整工具提示的设计和行为。

This plugin works only with the ACF PRO (version 5.5.0 or higher)

此插件仅适用于 ACF PRO (5.5.0或更高版本)

.

Localizations

本地化

    • English
    • 英语

    • Deutsch
    • Deutsch

    Custom settings with filter hooks

    带有过滤器挂钩的自定义设置

    There are 7 filters that allow adjusting the design and the behavior of the tooltips can be adjusted.

    有7个过滤器可以调整设计,并且可以调整工具提示的行为。

    Set the design of the tooltips

    设置工具提示的设计

      <?php

    function 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');

    ?>

    ?>

    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演示站点。

    You can mix the styles;

    您可以混合样式;

    e.g.

    例如

    “qtip-acf qtip-rounded qtip-shadow”

    “ qtip-acf qtip-rounded qtip-shadow”

    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文件中的样式类名定义自己的样式(请参见下一个过滤器)。

    The qtip-acf style is the standard style, which is set without a filter.

    qtip-acf样式是标准样式,设置时没有过滤器。

    Define your own CSS file

    定义您自己的CSS文件

      <?php

    function 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');

    ?>

    ?>

    You will find a ‘qtip-example-style.css’ in the ‘/assets/css’ folder.

    您将在“ / assets / css”文件夹中找到一个“ qtip-example-style.css”。

    Positioning the corner of the tooltip

    将工具提示的位置定位

      <?php

    function 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');

    ?>

    ?>

    Position in relation to the tooltip icon

    与工具提示图标相关的位置

      <?php

    function 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');

    ?>

    ?>

    Check out the qTip demo site to find your perfect positioning.

    访问 qTip演示网站,找到最合适的位置。

    Apply tooltips only to fields with specific class

    仅将工具提示应用于具有特定类别的字段

      <?php

    function 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');

    ?>

    ?>

    Add the class to the fields where you want to show tooltips.

    将类添加到要显示工具提示的字段中。

    Exclude tooltips on fields with specific class

    排除具有特定类别的字段上的工具提示

      <?php

    function 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');

    ?>

    ?>

    Add the class to the fields where you don’t want to show tooltips.

    将课程添加到您不想显示工具提示的字段中。

    Add tooltips to the Field Editor

    在字段编辑器中添加工具提示

    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.

    默认情况下,显示说明。

      <?php

    add_filter('acf/tooltip/fieldeditor', '__return_true');

    add_filter('acf / tooltip / fieldeditor','__return_true');

    ?>

    ?>

安装步骤

    1. Upload the acf-tooltip folder to your /wp-content/plugins/ directory
    2. acf-tooltip 文件夹上传到您的 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

    5. Done!
    6. 完成!

下载地址

https://downloads.wordpress.org/plugin/acf-tooltip.1.2.2.zip

https://downloads.wordpress.org/plugin/acf-tooltip.1.2.2.zip

-EOF-

AI助手支持GPT4.0