AI助手支持GPT4.0
Introduces a simple method for defining block areas to use the block editor outside of the post content.
介绍一种简单的方法来定义块区域,以在帖子内容之外使用块编辑器。 p>
This is an experimental plugin that explores basic usage of Gutenberg blocks outside of the content bubble, on a sitewide level.
这是一个实验性插件,可在整个站点范围内探索内容泡泡之外的Gutenberg块的基本用法。 p>
In the long term it will likely eliminate itself once WordPress core and Gutenberg will have completed the next phase of advancing to the sitewide level.
从长远来看,一旦WordPress核心和古腾堡(Gutenberg)将完成进入站点级的下一阶段,它很可能会淘汰自己。
The plugin exists as a baseline to have an easy way for experimenting with similar functionality already today.
该插件作为基准存在,可以提供一种简便的方法来试用如今已经存在的类似功能。 p>
After activating the plugin, you can create and edit block areas under Appearance > Block Areas.
激活插件后,您可以在外观>阻止区域 em>下创建和编辑阻止区域。There should be two block areas already, header and footer.应该已经有两个块区域,分别是 header code>和 footer code>。 p>Block areas are identified by their unique slug.块区域由其唯一的子弹标识。Since header and footer are expected to exist, make sure not to delete them.由于预计 header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
There should be two block areas already, header and footer.
header
footer
应该已经有两个块区域,分别是 header code>和 footer code>。 p>Block areas are identified by their unique slug.块区域由其唯一的子弹标识。Since header and footer are expected to exist, make sure not to delete them.由于预计 header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
header code>和 footer code>。 p>Block areas are identified by their unique slug.块区域由其唯一的子弹标识。Since header and footer are expected to exist, make sure not to delete them.由于预计 header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
footer code>。 p>Block areas are identified by their unique slug.块区域由其唯一的子弹标识。Since header and footer are expected to exist, make sure not to delete them.由于预计 header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
Block areas are identified by their unique slug.
块区域由其唯一的子弹标识。
Since header and footer are expected to exist, make sure not to delete them.
由于预计 header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
header code>和 footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
footer code>存在,因此请确保不要删除它们。 p>In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
In order to print a specific block area, for example in your theme, use block_areas()->render( $slug ) (eg block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
block_areas()->render( $slug )
block_areas()->render( 'header为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).') code>)。 p>You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
为了打印特定的块区域,例如在您的主题中,请使用 block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).
block_areas()-> render($ slug) code>(例如, block_areas()-> render('header ' )).
block_areas()-> render('header ' )
' )
') code>)。 p>
You can also explicitly add theme support, specifying which block area slugs your theme relies on (eg add_theme_support( 'block-areas', 'header', 'footer' )).
add_theme_support( 'block-areas', 'header', 'footer' )
您还可以显式添加主题支持,指定主题所依赖的块区域(例如 add_theme_support('block-areas','header','footer') code>)。 p >>
add_theme_support('block-areas','header','footer') code>)。 p >>
>
block-areas
/wp-content/plugins/
block-areas code>文件夹上传到 / wp-content / plugins / code>目录,或通过WordPress后端下载。 li>Activate the plugin through the ‘Plugins’ menu in WordPress.通过WordPress中的“插件”菜单激活插件。 li>
/ wp-content / plugins / code>目录,或通过WordPress后端下载。 li>Activate the plugin through the ‘Plugins’ menu in WordPress.通过WordPress中的“插件”菜单激活插件。 li>
ol>
原文出处:http://www.sanshu.cn/a/4825.html
群主管理都是支付大佬