[wordpress插件] Custom Taxonomies for Blocks块的自定义分类法

wordpress 插件 文章 2020-04-09 23:40 439 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Custom taxonomies that were developed prior to the release of WordPress 5.0 (the Gutenberg release) may not be compatible with the WordPress block editor.

在WordPress 5.0(古腾堡版本)发布之前开发的自定义分类法可能与WordPress块编辑器不兼容。

Custom taxonomies require that the “show_in_rest” property be set to “true” in order to work with the block editor.

自定义分类法要求将“ show_in_rest”属性设置为“ true”,以便与块编辑器一起使用。

“show_in_rest” was added with WordPress 4.7 and the integration of the WordPress JSON REST API.

WordPress 4.7中添加了“ show_in_rest”,并且集成了WordPress JSON REST API。

Sites using custom taxonomies that were created prior to this likely do not have this property set.

使用在此之前创建的自定义分类法的网站可能没有设置此属性。

Additionally, the default value for “show_in_rest” is “false” (this is poorly documented), ergo older custom taxonomies will not appear in the WordPress block editor interface.

此外,“ show_in_rest”的默认值为“ false” (此文献记录不多),因此,ergo较早的自定义分类法不会出现在WordPress块编辑器界面中。

This plugin will take any custom taxonomy where the “show_in_rest” feature is set to “false” and change it to “true”.

此插件将采用“ show_in_rest”功能设置为“ false”的任何自定义分类法,并将其更改为“ true”。

It will not add any additional REST properties, such as “rest_base” or “rest_controller_class”.

它不会添加任何其他REST属性,例如“ rest_base”或“ rest_controller_class”。

If you need those properties set for any reason, you will need to update your custom taxonomy where it is being registered.

如果出于任何原因需要设置这些属性,则需要在注册该分类的地方更新自定义分类。

安装步骤

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

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

下载地址
https://downloads.wordpress.org/plugin/custom-taxonomies-for-blocks.zip
-EOF-

AI助手支持GPT4.0