[wordpress插件] Admin Columns for ACF FieldsACF字段的管理列

wordpress 插件 文章 2020-02-03 02:00 636 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

Use this plugin to show ACF fields in the “All Posts” table view in the WordPress admin backend.

使用此插件可在WordPress管理后端的“所有帖子”表视图中显示ACF字段。

Simply enable the new option “Admin Column” in your ACF field settings for any regular field (see exceptions below).

只需在ACF字段设置中为任何常规字段启用新选项“管理列”(请参见下面的例外情况)。

Now there will be an extra column for your field shown in any overview of posts, pages, taxonomies or your custom post types or taxonomies (e.g. “All Pages”).

现在,在任何帖子,页面,分类法或自定义帖子类型或分类法(例如“所有页面”)的概述中,您的字段都会显示一个额外的列。

You can use filters (see below) to control the plugins behaviour even more precisely.

您可以使用过滤器(见下文)来更精确地控制插件的行为。

Works on any regular ACF field (see exceptions below).

可在任何常规ACF字段上使用(请参见下面的异常)。

Compatible with Advanced Custom Fields 5.x

与高级自定义字段5.x兼容

Github: https://github.com/fleiflei/acf-admin-columns

Github:https://github.com/fleiflei/acf-admin-columns

Usage:

用法:

    1. Install ACF and this plugin (see below)
    2. 安装ACF和此插件(见下文)

    3. In ACF open/create your “field group” within ACF and note the post type that this field group applies to (at the bottom).

    4. 在ACF中,在ACF中打开/创建“字段组”,并记下该字段组适用的帖子类型(在底部)。

    5. Open any field for editing (see exceptions below).
    6. 打开任何字段进行编辑(请参见下面的例外)。

    7. Enable the “Admin Column” option in the field settings.

    8. 在字段设置中启用“管理列”选项。

    9. Enable post types and/or taxonomies for which the column should be shown.
    10. 启用应为其显示列的帖子类型和/或分类法。

    11. Save the field group and go to the overview page of the post type or taxonomy (eg “Posts > All Posts”, or “Pages > All Pages”) that you noted above and notice the newly added column for your field.

    12. 保存字段组,然后转到您上面提到的帖子类型或分类法的概述页面(例如“帖子>所有帖子”或“页面>所有页面”),并注意为该字段添加的新列。

    Advanced Usage

    高级用法

    Excluded ACF Fields

    排除的ACF字段

    Due to their nature the option “Admin Column” is not shown in ACF for these fields:

    由于其性质,这些字段中的“管理列”选项未在ACF中显示:

      • Accordion
      • 手风琴

      • Clone
      • 克隆

      • Flexible Content
      • 灵活的内容

      • Google Map
      • Google地图

      • Group
      • Message
      • 消息

      • Repeater
      • 中继器

      • Tab
      • 标签

      Filters

      过滤器

      “acf/admin_columns/admin_columns”

      “ acf / admin_columns / admin_columns”

      Allows you to change which columns are displayed on the current admin screen.

      允许您更改当前管理屏幕上显示的列。

      Parameters
          

      参数
          

      $fields – Array of all ACF fields to be shown in current screen.

      $ fields –将在当前屏幕中显示的所有ACF字段的数组。

      Example:

      示例:

      function my_admin_columns($fields) {  

        function my_admin_columns($ fields){  

      $fields['my_field'] = 'my_field';

      $ fields ['my_field'] ='my_field';

      }

      }

      add_filter('acf/admin_columns/admin_columns','my_admin_columns');

      add_filter('acf / admin_columns / admin_columns','my_admin_columns');

      “acf/admin_columns/sortable_columns”

      “ acf / admin_columns / sortable_columns”

      Change which columns should be sortable.

      更改应可排序的列。

      By default every column is sortable.

      默认情况下,每一列都是可排序的。

      Parameters

      参数

      $columns – Array of all ACF fields to be shown in current screen.

      $ columns –将在当前屏幕中显示的所有ACF字段的数组。

      “acf/admin_columns/column/$field”

      “ acf / admin_columns / column / $ field”

      Allows you to modify the output of a certain $field in every row of a posts table.

      允许您修改posts表每一行中某个$ field的输出。

      Parameters

      参数

      $field_value – The field value

      $ field_value –字段值

安装步骤

This section describes how to install the plugin and get it working.

本节介绍如何安装插件并使其正常工作。

    1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
    2. 将插件文件上传到 / wp-content / plugins / plugin-name 目录,或直接通过WordPress插件屏幕安装插件。

    3. Activate the plugin through the ‘Plugins’ screen in WordPress
    4. 通过WordPress中的“插件”屏幕激活插件

    5. Open ACF and enable “Admin Column” in any fields settings section.
    6. 打开ACF并在任何字段设置部分中启用“管理列”。

下载地址

https://downloads.wordpress.org/plugin/admin-columns-for-acf-fields.zip

https://downloads.wordpress.org/plugin/admin-columns-for-acf-fields.zip

-EOF-

AI助手支持GPT4.0