[WordPress] 外掛分享: Chunks

首頁外掛目錄 › Chunks
10+
安裝啟用
尚無評分
5388 天前
最後更新
問題解決
WordPress 2.8+ v1.1 上架:2011-03-13

內容簡介

Chunks 是為了主題開發人員而設計的,他們的主題包含了許多頁腳文字、版權聲明、區塊標題和描述、口號等等,這些有時被硬編碼到主題中,有時是本地化的 (可以在 po 和 mo 檔案中更改),有時則被拿到主題選項中。

Chunks 可以幫您處理這些問題。一個“chunk”是一段 HTML 程式碼,可以插入到主題的任何地方,在您的管理面板中的外觀下的主題片段頁面中進行編輯。在您的 functions.php 中使用 register_chunks() 將 chunks 註冊為您的主題,並使用 chunk() 在您的模板檔案中的任何地方獲取 chunk 值。

您只需花費 5 分鐘便能在您的主題中實現 Chunks: 開始使用 Chunks

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Chunks」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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) and sometimes taken out to the theme options.
Chunks will do the job for you. 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. 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.
It’ll take you 5 minutes to implement Chunks in your theme: Getting Started with Chunks

延伸相關外掛

文章
Filter
Apply Filters
Mastodon