[wordpress插件] Chunks大块

wordpress 插件 文章 2020-03-23 13:00 0 173 全屏看文
评分
0
描述

Chunks is for theme developers that have their themes filled with footer notes, copyright notices, block titles and descriptions, slogans, etc, which are sometimes hard-coded into the theme, sometimes localized (can be changed in po and mo files

Chunk适用于主题开发人员,其主题充满页脚注,版权声明,块标题和描述,标语等,这些有时会硬编码到主题中,有时会本地化(可以在po和mo文件中更改

) and sometimes taken out to the theme options.

),有时还会带出主题选项。

Chunks will do the job for you.

Chunks将为您完成这项工作。

A “chunk” is a piece of HTML code that could be inserted anywhere in your theme and edited from the Theme Chunks page under Appearance in your admin panel.

“块”是一段HTML代码,可以插入主题的任何位置,并可以在管理面板中“外观”下的“主题块”页面中进行编辑。

Use register_chunks() in your functions.php to register chunks for your theme and use the chunk() to get the chunk value anywhere in your template files.

在您的functions.php中使用register_chunks()注册主题的块,并使用chunk()获取模板文件中任何位置的块值。

It'll take you 5 minutes to implement Chunks in your theme:

要在您的主题中实现Chunk,需要5分钟:

>Getting Started with Chunks

>大块入门

安装步骤

    1. Upload archive contents to the /wp-content/plugins/ directory.
    2. 将存档内容上传到 / wp-content / plugins / 目录。

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

    5. Modify your theme to implement chunks.
    6. 将您的主题修改为实现块。

    7. Look for the ‘Theme Chunks’ option under your ‘Appearance’ menu.
    8. 在“外观”菜单下找到“主题块”选项。

下载地址
https://downloads.wordpress.org/plugin/chunks.1.1.zip
-EOF-