[wordpress插件] Aside Widget旁边的小部件

wordpress 插件 文章 2020-02-21 23:10 494 0 全屏看文

AI助手支持GPT4.0

评分
0
描述

Aside widget allows a page or post to insert arbitrary content into a

旁边的小部件允许页面或帖子将任意内容插入

sidebar (or other dynamic widget area), supporting something similar to the

侧栏(或其他动态窗口小部件区域),支持类似于

typographic notion of a ‘pull-quote’.

的印刷概念。

Aside widget is triggered by the presence, in those pages which require it,

在需要小部件的页面中,小部件会由存在状态触发,

of one or more ‘aside’ custom fields with values that specify the content

一个或多个“ aside”自定义字段,其值指定了内容

of one or more widgets.

一个或多个小部件。

Shifting the locus of widget content control from

将窗口小部件内容控制的源于

the widget to the page makes for more natural authoring of conditional

该页面的小部件可更自然地编写条件

content which needs to be associated with just a small number of pages.

只需要与少量页面相关联的内容。

As well as text, an ‘aside’ custom field may contain HTML and/or PHP code.

“ aside”自定义字段除包含文本外,还可能包含HTML和/或PHP代码。

Of course, any HTML should be crafted so as not to break the containing

当然,应精心设计任何HTML,以免破坏包含的内容。

page structure.

页面结构。

PHP parsing must be explicitly enabled in the widget

必须在小部件中显式启用PHP解析

administration panel and any PHP in the ‘aside’ field value must be enclosed

管理面板和“ aside”字段值中的所有PHP都必须包含

in the usual tags for it to be recognised.

在通常的标签中才能对其进行识别。

A little bit of short-form magic can be triggered by formatting the aside

通过格式化一旁可以触发一些短形式的魔术

field value in the following way.

字段值的方式如下。

{#|!|!!}id[,prefix,suffix]

  {#|!| !!} id [,前缀,后缀]

A value of the form #id (e.g. ‘#232’) causes the the page or post

以#id形式的值(例如“#232”)导致页面或帖子

identified by the integer id to be used as the widget content.

由整数ID标识的窗口小部件内容。

A value of the form !id (e.g. ‘!myasidediv’) causes the contents of the

!id格式的值(例如“!myasidediv”)会导致
的内容

HTML DIV identified by id to be used as the widget content.

由ID标识的HTML DIV用作窗口小部件内容。

The selected

选定的

DIV must reside withing the current page or post.

DIV必须驻留在当前页面或帖子中。

Normally, the selected

通常,选择的

DIV is removed from display within the page proper, but a value of the form

DIV已从页面内的适当显示中移除,但值的形式为

!!id causes the DIV to remain in the normal page flow.

!! id导致DIV保留在正常页面流中。

Processing of page

页面处理

content for the identified DIV is unsophisticated: the DIV must not itself

所标识的DIV的内容并不复杂:DIV本身不能

contain any other DIVs and the DIV id attribute must be the first attribute

包含任何其他DIV,并且DIV id属性必须是第一个属性

after the tag name.

标签名称之后。

Prefix and suffix can be used to specify arbitrary text/HTML which will

前缀和后缀可用于指定任意文本/ HTML,

be used to bracket the selected widget content.

用于包围所选小部件内容。

PHP can also be used, but

也可以使用PHP,但是

will only work if parsing is enabled as described above.

仅在如上所述启用分析的情况下才能工作。

Examples

示例

A few examples of the use of magic values in the ‘aside’ field.

在“ aside”字段中使用魔术值的一些示例。

#232

 #232

Display page 232 in the aside widget.

在旁边的小部件中显示第232页。

!mydiv

 !mydiv

Remove the contents of

...
from the current

从当前
中删除

... 的内容

page and display it in the aside widget.

页并显示在旁边的小部件中。

!!mydiv

  !! mydiv

As above, but leave the content in the page.

如上所述,但将内容保留在页面中。

!!mydiv,,

  !! mydiv, 

As above, but style the widget output in some special way.

如上所述,但是以某种特殊方式设置小部件输出的样式。

安装步骤

    1. Place the zip archive in /wp-content/plugins.
    2. 将zip归档文件放在/ wp-content / plugins中。

    3. Unzip the archive (and then delete it if you wish).
    4. 解压缩归档文件(然后根据需要将其删除)。

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

    7. Use the widget like any other widget.
    8. 像其他小部件一样使用该小部件。

下载地址
https://downloads.wordpress.org/plugin/aside.0.9.zip
-EOF-

AI助手支持GPT4.0